From: Greg Sabino Mullane Date: Mon, 13 Sep 2010 15:04:04 +0000 (+0000) Subject: Add new index on pagelinkes(pl_title) per suggestion from bug 25111 X-Git-Tag: 1.31.0-rc.0~34958 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/?a=commitdiff_plain;h=cb1c5fd26bd32e0edb4e43ea86b05c39161e6303;p=lhc%2Fweb%2Fwiklou.git Add new index on pagelinkes(pl_title) per suggestion from bug 25111 --- diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index 7066caecba..d881a69d7b 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -173,6 +173,7 @@ class PostgresUpdater extends DatabaseUpdater { array( 'addPgIndex', 'image', 'img_sha1', '(img_sha1)' ), array( 'addPgIndex', 'oldimage', 'oi_sha1', '(oi_sha1)' ), array( 'addPgIndex', 'page', 'page_mediawiki_title', '(page_title) WHERE page_namespace = 8' ), + array( 'addPgIndex', 'pagelinks', 'pagelinks_title', '(pl_title)' ), array( 'addPgIndex', 'revision', 'rev_text_id_idx', '(rev_text_id)' ), array( 'addPgIndex', 'recentchanges', 'rc_timestamp_bot', '(rc_timestamp) WHERE rc_bot = 0' ), array( 'addPgIndex', 'templatelinks', 'templatelinks_from', '(tl_from)' ), diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql index 446e352c61..0b72b36796 100644 --- a/maintenance/postgres/tables.sql +++ b/maintenance/postgres/tables.sql @@ -169,6 +169,7 @@ CREATE TABLE pagelinks ( pl_title TEXT NOT NULL ); CREATE UNIQUE INDEX pagelink_unique ON pagelinks (pl_from,pl_namespace,pl_title); +CREATE INDEX pagelinks_title ON pagelinks (pl_title); CREATE TABLE templatelinks ( tl_from INTEGER NOT NULL REFERENCES page(page_id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,