File: version-021.sql

package info (click to toggle)
geary 0.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,332 kB
  • ctags: 5,261
  • sloc: ansic: 26,847; sql: 174; makefile: 121; xml: 101; python: 18; sh: 17
file content (13 lines) | stat: -rw-r--r-- 651 bytes parent folder | download | duplicates (8)
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);