1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00
phorge-phorge/resources/sql/patches/050.taskdenormal.sql
epriestley 4469ef8f30 Allow Maniphest to scale to a massive size
Summary:
Maniphest is missing some keys and some query strategy which will make it
cumbersome to manage more than a few tens of thousands of tasks.

Test Plan:
Handily manipulated 100k-scale task groups. Maniphest takes about 250ms to
select and render pages of 1,000 tasks and has no problem paging and filtering
them, etc. We should be good to scale to multiple millions of tasks with these
changes.

Reviewed By: gc3
Reviewers: fratrik, jungejason, aran, tuomaspelkonen, gc3
Commenters: jungejason
CC: anjali, aran, epriestley, gc3, jungejason
Differential Revision: 534
2011-06-28 06:41:05 -07:00

20 lines
547 B
SQL

ALTER TABLE phabricator_maniphest.maniphest_task
ADD ownerOrdering varchar(64);
ALTER TABLE phabricator_maniphest.maniphest_task
ADD UNIQUE KEY (phid);
ALTER TABLE phabricator_maniphest.maniphest_task
ADD KEY (priority, status);
ALTER TABLE phabricator_maniphest.maniphest_task
ADD KEY (status);
ALTER TABLE phabricator_maniphest.maniphest_task
ADD KEY (ownerPHID, status);
ALTER TABLE phabricator_maniphest.maniphest_task
ADD KEY (authorPHID, status);
ALTER TABLE phabricator_maniphest.maniphest_task
ADD KEY (ownerOrdering);