File: version-021.sql

package info (click to toggle)
geary 46.0-7
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 15,092 kB
  • sloc: javascript: 972; ansic: 722; sql: 247; xml: 183; python: 30; sh: 24; makefile: 23
file content (13 lines) | stat: -rw-r--r-- 651 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
--
-- Some queries that hit the MessageLocationTable, like those used by the email
-- prefetcher, were slow because we didn't have a covering index.  This makes
-- an index that *is* covering, for the cases in question anyway.  Since we
-- (should) never care about ordering without folder_id, and since folder_id
-- comes first here so this index effectively indexes queries on just that
-- field too, we can also drop the old, ineffective indices.
--

DROP INDEX MessageLocationTableFolderIdIndex;
DROP INDEX MessageLocationTableOrderingIndex;
CREATE INDEX MessageLocationTableFolderIDOrderingIndex
    ON MessageLocationTable(folder_id, ordering);