Split down patch-comment-table.sql
[lhc/web/wiklou.git] / maintenance / archives / patch-backlinkindexes.sql
1 --
2 -- patch-backlinkindexes.sql
3 --
4 -- Per task T8440 / https://phabricator.wikimedia.org/T8440
5 --
6 -- Improve performance of the "what links here"-type queries
7 --
8
9 ALTER TABLE /*$wgDBprefix*/pagelinks
10 DROP INDEX pl_namespace,
11 ADD INDEX pl_namespace(pl_namespace, pl_title, pl_from);
12
13 ALTER TABLE /*$wgDBprefix*/templatelinks
14 DROP INDEX tl_namespace,
15 ADD INDEX tl_namespace(tl_namespace, tl_title, tl_from);
16
17 ALTER TABLE /*$wgDBprefix*/imagelinks
18 DROP INDEX il_to,
19 ADD INDEX il_to(il_to, il_from);