From: Greg Sabino Mullane Date: Sat, 11 Oct 2008 11:45:26 +0000 (+0000) Subject: Add index on templatelinks.tl_from X-Git-Tag: 1.31.0-rc.0~44794 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=cbef9787ec77e85f7aa6d8c8c768efa2703e2788;p=lhc%2Fweb%2Fwiklou.git Add index on templatelinks.tl_from --- diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index 1b5358df5b..bc58513a89 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -173,6 +173,7 @@ CREATE TABLE templatelinks ( tl_title TEXT NOT NULL ); CREATE UNIQUE INDEX templatelinks_unique ON templatelinks (tl_namespace,tl_title,tl_from); +CREATE INDEX templatelinks_from ON templatelinks (tl_from); CREATE TABLE imagelinks ( il_from INTEGER NOT NULL REFERENCES page(page_id) ON DELETE CASCADE, diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index f58fe7b71f..d4d3f6a15b 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -1547,6 +1547,7 @@ function do_postgres_updates() { array("oldimage", "oi_sha1", "(oi_sha1)"), array("revision", "rev_text_id_idx", "(rev_text_id)"), array("recentchanges", "rc_timestamp_nobot", "(rc_timestamp) WHERE rc_bot = 0"), + array("templatelinks", "templatelinks_from", "(tl_from)"), array("watchlist", "wl_user", "(wl_user)"), ); @@ -1749,7 +1750,7 @@ function do_postgres_updates() { # This is create or replace, so harmless to call if not needed dbsource(archive('patch-ts2pagetitle.sql')); - ## If the server is 8.3 or higher, rewrite teh tsearch2 triggers + ## If the server is 8.3 or higher, rewrite the tsearch2 triggers ## in case they have the old 'default' versions if ( $numver >= 8.3 ) dbsource(archive('patch-tsearch2funcs.sql'));