mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-17 21:39:49 -04:00
Added indexes based on slow query logs and associated `EXPLAIN QUERY PLAN` output. Note: There are some composite primary keys with `repoId` + `packageName` + ..., and we still ad an index on `packageName`. This is because the order matters in composite keys. It might be possible to restructure the primary key to be `packageName` + `repoId` + ..., however this requires removing the table and recreating it which is more complex then just adding an index on `packageIndex` in addition to the primary key. There is also no guarantee that things wont slow down when restructuring the primary key, because there may be some cases where it is important that `repoId` is first in that index.