Homec4science

Improve Differential query plans

Authored by epriestley <git@epriestley.com> on Jun 17 2015, 20:25.

Description

Improve Differential query plans

Summary:
Ref T8575. We run a big "(A) UNION (B)" query on the home page and on the main Differential page.

"A" can always be improved by using %Ls, so it can use the second half of the (authorPHID, status) key.

"B" can sometimes be improved if the fraction of open revisions is smaller than the fraction of revisions you are reviewing. This is true for me on secure.phabricator.com (I'm a reviewer, either directly or via 'Blessed Reviewers', on about 80% of revisions, but <5% are open). In these cases, a (status, phid) key is more efficient.

Test Plan: Tweaked queries and added keys on this server, saw less derpy query plans and performance.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T8575

Differential Revision: https://secure.phabricator.com/D13325

Details

Committed
epriestley <git@epriestley.com>Jun 17 2015, 20:25
Pushed
aubortJan 31 2017, 17:16
Parents
rPH984976ce2029: Cache viewer spaces
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHb3ae48d8ca2d: Improve Differential query plans (authored by epriestley <git@epriestley.com>).Jun 17 2015, 20:25