From d739d8ccd5677a3edd16e565a3fb2861bf9e6d53 Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Wed, 14 Dec 2011 18:10:20 -0800 Subject: [PATCH] Paste - upgrade scheme to support queries by authorPHID Test Plan: ran upgrade_schema.php on my local install. re-examined SQL query "explain select * from phabricator_pastebin.pastebin_paste where authorPHID = "PHID-USER-xee4ju2teq7mflitwfcs" ORDER BY id DESC;" on my local install and noted fewer rows scanned, index used, etc Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: 1218 --- resources/sql/patches/084.pasteauthorkey.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 resources/sql/patches/084.pasteauthorkey.sql diff --git a/resources/sql/patches/084.pasteauthorkey.sql b/resources/sql/patches/084.pasteauthorkey.sql new file mode 100644 index 0000000000..80535dac63 --- /dev/null +++ b/resources/sql/patches/084.pasteauthorkey.sql @@ -0,0 +1,2 @@ +ALTER TABLE phabricator_pastebin.pastebin_paste + ADD KEY (authorPHID);