After exhuastive research, we concluded that iwl_prefix_from_title is not used and in case it's actually used, other indexes provide enough cardinality. This table is about to grow quite large in Commons, let's avoid making it bigger than it needs to be. Bug: T343131 Change-Id: I89e40dff384291968d2465e4109a3d212ae2f8c7
29 lines
879 B
SQL
29 lines
879 B
SQL
-- This file is automatically generated using maintenance/generateSchemaChangeSql.php.
|
|
-- Source: maintenance/abstractSchemaChanges/patch-iwlinks-drop-iwl_prefix_from_title.json
|
|
-- Do not modify this file directly.
|
|
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes
|
|
CREATE TEMPORARY TABLE /*_*/__temp__iwlinks AS
|
|
SELECT
|
|
iwl_from,
|
|
iwl_prefix,
|
|
iwl_title
|
|
FROM /*_*/iwlinks;
|
|
DROP TABLE /*_*/iwlinks;
|
|
|
|
|
|
CREATE TABLE /*_*/iwlinks (
|
|
iwl_from INTEGER UNSIGNED DEFAULT 0 NOT NULL,
|
|
iwl_prefix BLOB DEFAULT '' NOT NULL,
|
|
iwl_title BLOB DEFAULT '' NOT NULL,
|
|
PRIMARY KEY(iwl_from, iwl_prefix, iwl_title)
|
|
);
|
|
INSERT INTO /*_*/iwlinks (iwl_from, iwl_prefix, iwl_title)
|
|
SELECT
|
|
iwl_from,
|
|
iwl_prefix,
|
|
iwl_title
|
|
FROM
|
|
/*_*/__temp__iwlinks;
|
|
DROP TABLE /*_*/__temp__iwlinks;
|
|
|
|
CREATE INDEX iwl_prefix_title_from ON /*_*/iwlinks (iwl_prefix, iwl_title, iwl_from);
|