Index: trunk/phase3/maintenance/postgres/tables.sql |
— | — | @@ -177,7 +177,7 @@ |
178 | 178 | cl_timestamp TIMESTAMPTZ NOT NULL |
179 | 179 | ); |
180 | 180 | CREATE UNIQUE INDEX cl_from ON categorylinks (cl_from, cl_to); |
181 | | -CREATE INDEX cl_sortkey ON categorylinks (cl_to, cl_sortkey); |
| 181 | +CREATE INDEX cl_sortkey ON categorylinks (cl_to, cl_sortkey, cl_from); |
182 | 182 | |
183 | 183 | CREATE TABLE externallinks ( |
184 | 184 | el_from INTEGER NOT NULL REFERENCES page(page_id) ON DELETE CASCADE, |
Index: trunk/phase3/maintenance/tables.sql |
— | — | @@ -473,7 +473,7 @@ |
474 | 474 | UNIQUE KEY cl_from (cl_from,cl_to), |
475 | 475 | |
476 | 476 | -- We always sort within a given category... |
477 | | - KEY cl_sortkey (cl_to,cl_sortkey), |
| 477 | + KEY cl_sortkey (cl_to,cl_sortkey,cl_from), |
478 | 478 | |
479 | 479 | -- Not really used? |
480 | 480 | KEY cl_timestamp (cl_to,cl_timestamp) |