From 233a2055f1dbdbf9cc8810491d37f082b79ffde8 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 9 Jul 2011 01:17:44 -0700 Subject: [PATCH] Add missing keys to some tables Summary: I wrote a little query plan plugin for "Services", it's not ready yet but it found a few cases where we're doing table scans. Test Plan: https://secure.phabricator.com/file/view/PHID-FILE-374fd7e846a0ce27d5fb/ https://secure.phabricator.com/file/view/PHID-FILE-2f680de9b8c3c3b7089e/ https://secure.phabricator.com/file/view/PHID-FILE-742f645fcf011252ff25/ Reviewed By: jungejason Reviewers: jungejason, tuomaspelkonen, aran CC: aran, jungejason Differential Revision: 627 --- resources/sql/patches/058.missingkeys.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 resources/sql/patches/058.missingkeys.sql diff --git a/resources/sql/patches/058.missingkeys.sql b/resources/sql/patches/058.missingkeys.sql new file mode 100644 index 0000000000..885c23558e --- /dev/null +++ b/resources/sql/patches/058.missingkeys.sql @@ -0,0 +1,11 @@ +ALTER TABLE phabricator_file.file + ADD UNIQUE KEY (phid); + +ALTER TABLE phabricator_project.project + ADD UNIQUE KEY (phid); + +ALTER TABLE phabricator_herald.herald_condition + ADD KEY (ruleID); + +ALTER TABLE phabricator_herald.herald_action + ADD KEY (ruleID); \ No newline at end of file