aboutsummaryrefslogtreecommitdiffstats
path: root/sql/postgres/patch-iwlinks-pk.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sql/postgres/patch-iwlinks-pk.sql')
-rw-r--r--sql/postgres/patch-iwlinks-pk.sql8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/postgres/patch-iwlinks-pk.sql b/sql/postgres/patch-iwlinks-pk.sql
new file mode 100644
index 000000000000..68c82b432a80
--- /dev/null
+++ b/sql/postgres/patch-iwlinks-pk.sql
@@ -0,0 +1,8 @@
+DROP INDEX IF EXISTS iwl_from;
+DROP INDEX IF EXISTS iwl_prefix_title_from;
+DROP INDEX IF EXISTS iwl_prefix_from_title;
+ALTER TABLE iwlinks
+ ADD PRIMARY KEY (iwl_from, iwl_prefix, iwl_title);
+
+CREATE INDEX iwl_prefix_title_from ON iwlinks (iwl_prefix, iwl_title, iwl_from);
+CREATE INDEX iwl_prefix_from_title ON iwlinks (iwl_prefix, iwl_from, iwl_title);