mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
b5f7e9eec6
Summary: Ref T6615. Mixing ASC and DESC ordering on a multipart key makes it dramatically less effective (or perhaps totally ineffective). Reverse the meaning of the `priority` column so it goes in the same direction as the `id` column (both ascending, lower values execute sooner). Test Plan: - Queued 1.2M tasks with `bin/worker flood`. - Processed ~1 task/second with `bin/phd debug taskmaster` before patch. - Applied patch, took ~5 seconds for ~1.2M rows. - Processed ~100-200 tasks/second with `bin/phd debug taskmaster` after patch. - "Next in Queue" query on daemon page dropped from 1.5s to <1ms. Reviewers: btrahan Reviewed By: btrahan Subscribers: aklapper, 20after4, epriestley Maniphest Tasks: T6615 Differential Revision: https://secure.phabricator.com/D10895
2 lines
80 B
SQL
2 lines
80 B
SQL
UPDATE {$NAMESPACE}_worker.worker_archivetask
|
|
SET priority = 5000 - priority;
|