getpatchwork / patchwork

Patchwork is a web-based patch tracking system designed to facilitate the contribution and management of contributions to an open-source project.
http://jk.ozlabs.org/projects/patchwork/
GNU General Public License v2.0
276 stars 82 forks source link

Doing queries that use archieved and state_id at the same time is slow on patchwork 3.1 #581

Open mchehab opened 9 months ago

mchehab commented 9 months ago

This is a low hanging fruit. Just creating this index solved the issue:

CREATE INDEX idx_patch_state_id_archived on patchwork_patch (state_id, archived);