From 720af267a709deb3b03e1da3e55d7dd7201c6fca Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 23 Oct 2011 14:09:52 -0700 Subject: [PATCH] Add a missing key to the ManiphestTransaction table Summary: Caught a bad (8ms) query that didn't have a good key available. Add an appropriate key. The query in question is: SELECT * FROM `maniphest_transaction` WHERE taskID = 262 ORDER BY id ASC; ...which is used in the task detail view. Test Plan: Ran EXPLAIN on this query before/after upgrading, it now uses the newly available key. Reviewers: jungejason, nh, tuomaspelkonen, aran Reviewed By: aran CC: aran Differential Revision: 1037 --- resources/sql/patches/082.xactionkey.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 resources/sql/patches/082.xactionkey.sql diff --git a/resources/sql/patches/082.xactionkey.sql b/resources/sql/patches/082.xactionkey.sql new file mode 100644 index 0000000000..ecb6999690 --- /dev/null +++ b/resources/sql/patches/082.xactionkey.sql @@ -0,0 +1,2 @@ +ALTER TABLE phabricator_maniphest.maniphest_transaction + ADD KEY (taskID);