X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Ftables.sql;h=2b6ea03cc6d3eea451c359dab2467dc82b6cbb20;hb=2b7d97e6a49c46eeb0e1018dd51ae5e79b2f373e;hp=cf60d89bf5d95e7c7860a5ec3a084d2bf7f0340b;hpb=a3b1ef7c21ba9af94f611f6ca1d64e75710db176;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/tables.sql b/maintenance/tables.sql index cf60d89bf5..2b6ea03cc6 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql @@ -676,12 +676,19 @@ CREATE TABLE /*_*/externallinks ( -- which allows for fast searching for all pages under example.com with the -- clause: -- WHERE el_index LIKE 'http://com.example.%' - el_index blob NOT NULL + el_index blob NOT NULL, + + -- This is el_index truncated to 60 bytes to allow for sortable queries that + -- aren't supported by a partial index. + -- @todo Drop the default once this is deployed everywhere and code is populating it. + el_index_60 varbinary(60) NOT NULL default '' ) /*$wgDBTableOptions*/; CREATE INDEX /*i*/el_from ON /*_*/externallinks (el_from, el_to(40)); CREATE INDEX /*i*/el_to ON /*_*/externallinks (el_to(60), el_from); CREATE INDEX /*i*/el_index ON /*_*/externallinks (el_index(60)); +CREATE INDEX /*i*/el_index_60 ON /*_*/externallinks (el_index_60, el_id); +CREATE INDEX /*i*/el_from_index_60 ON /*_*/externallinks (el_from, el_index_60, el_id); -- -- Track interlanguage links