This table has eight indexes plus PK. It has around 1000 rows only. Even if it needs these indexes (which it doesn't), they are still useless. Looking at the code, the only potential useful index is the one on site_global_key, they are showing up in the report of unused indexes in the db and I checked with Fandom (which might benefit from an index on this table) and they said they don't use sites table. Bug: T342856 Change-Id: I06b3db0f33bd35bfa68f4b418d8c2f4b9b988409
162 lines
5.4 KiB
JSON
162 lines
5.4 KiB
JSON
{
|
|
"comment": "Drop unused indexes of sites table",
|
|
"before": {
|
|
"name": "sites",
|
|
"comment": "Holds all the sites known to the wiki.",
|
|
"columns": [
|
|
{
|
|
"name": "site_id",
|
|
"type": "integer",
|
|
"comment": "Numeric id of the site",
|
|
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
|
|
},
|
|
{
|
|
"name": "site_global_key",
|
|
"type": "binary",
|
|
"comment": "Global identifier for the site, ie 'enwiktionary'",
|
|
"options": { "notnull": true, "length": 64 }
|
|
},
|
|
{
|
|
"name": "site_type",
|
|
"type": "binary",
|
|
"comment": "Type of the site, ie 'mediawiki'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_group",
|
|
"type": "binary",
|
|
"comment": "Group of the site, ie 'wikipedia'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_source",
|
|
"type": "binary",
|
|
"comment": "Source of the site data, ie 'local', 'wikidata', 'my-magical-repo'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_language",
|
|
"type": "binary",
|
|
"comment": "Language code of the sites primary language.",
|
|
"options": { "notnull": true, "length": 35 }
|
|
},
|
|
{
|
|
"name": "site_protocol",
|
|
"type": "binary",
|
|
"comment": "Protocol of the site, ie 'http://', 'irc://', '//'. This field is an index for lookups and is build from type specific data in site_data.",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_domain",
|
|
"type": "string",
|
|
"comment": "Domain of the site in reverse order, ie 'org.mediawiki.www.'. This field is an index for lookups and is build from type specific data in site_data.",
|
|
"options": { "notnull": true, "length": 255 }
|
|
},
|
|
{
|
|
"name": "site_data",
|
|
"type": "blob",
|
|
"comment": "Type dependent site data.",
|
|
"options": { "notnull": true, "length": 65530 }
|
|
},
|
|
{
|
|
"name": "site_forward",
|
|
"type": "mwtinyint",
|
|
"comment": "If site.tld/path/key:pageTitle should forward users to the page on the actual site, where \"key\" is the local identifier.",
|
|
"options": { "notnull": true, "length": 1 }
|
|
},
|
|
{
|
|
"name": "site_config",
|
|
"type": "blob",
|
|
"comment": "Type dependent site config. For instance if template transclusion should be allowed if it's a MediaWiki.",
|
|
"options": { "notnull": true, "length": 65530 }
|
|
}
|
|
],
|
|
"indexes": [
|
|
{ "name": "site_global_key", "columns": [ "site_global_key" ], "unique": true },
|
|
{ "name": "site_type", "columns": [ "site_type" ], "unique": false },
|
|
{ "name": "site_group", "columns": [ "site_group" ], "unique": false },
|
|
{ "name": "site_source", "columns": [ "site_source" ], "unique": false },
|
|
{ "name": "site_language", "columns": [ "site_language" ], "unique": false },
|
|
{ "name": "site_protocol", "columns": [ "site_protocol" ], "unique": false },
|
|
{ "name": "site_domain", "columns": [ "site_domain" ], "unique": false },
|
|
{ "name": "site_forward", "columns": [ "site_forward" ], "unique": false }
|
|
],
|
|
"pk": [ "site_id" ]
|
|
},
|
|
"after": {
|
|
"name": "sites",
|
|
"comment": "Holds all the sites known to the wiki.",
|
|
"columns": [
|
|
{
|
|
"name": "site_id",
|
|
"type": "integer",
|
|
"comment": "Numeric id of the site",
|
|
"options": { "unsigned": true, "notnull": true, "autoincrement": true }
|
|
},
|
|
{
|
|
"name": "site_global_key",
|
|
"type": "binary",
|
|
"comment": "Global identifier for the site, ie 'enwiktionary'",
|
|
"options": { "notnull": true, "length": 64 }
|
|
},
|
|
{
|
|
"name": "site_type",
|
|
"type": "binary",
|
|
"comment": "Type of the site, ie 'mediawiki'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_group",
|
|
"type": "binary",
|
|
"comment": "Group of the site, ie 'wikipedia'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_source",
|
|
"type": "binary",
|
|
"comment": "Source of the site data, ie 'local', 'wikidata', 'my-magical-repo'",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_language",
|
|
"type": "binary",
|
|
"comment": "Language code of the sites primary language.",
|
|
"options": { "notnull": true, "length": 35 }
|
|
},
|
|
{
|
|
"name": "site_protocol",
|
|
"type": "binary",
|
|
"comment": "Protocol of the site, ie 'http://', 'irc://', '//'. This field is an index for lookups and is build from type specific data in site_data.",
|
|
"options": { "notnull": true, "length": 32 }
|
|
},
|
|
{
|
|
"name": "site_domain",
|
|
"type": "string",
|
|
"comment": "Domain of the site in reverse order, ie 'org.mediawiki.www.'. This field is an index for lookups and is build from type specific data in site_data.",
|
|
"options": { "notnull": true, "length": 255 }
|
|
},
|
|
{
|
|
"name": "site_data",
|
|
"type": "blob",
|
|
"comment": "Type dependent site data.",
|
|
"options": { "notnull": true, "length": 65530 }
|
|
},
|
|
{
|
|
"name": "site_forward",
|
|
"type": "mwtinyint",
|
|
"comment": "If site.tld/path/key:pageTitle should forward users to the page on the actual site, where \"key\" is the local identifier.",
|
|
"options": { "notnull": true, "length": 1 }
|
|
},
|
|
{
|
|
"name": "site_config",
|
|
"type": "blob",
|
|
"comment": "Type dependent site config. For instance if template transclusion should be allowed if it's a MediaWiki.",
|
|
"options": { "notnull": true, "length": 65530 }
|
|
}
|
|
],
|
|
"indexes": [
|
|
{ "name": "site_global_key", "columns": [ "site_global_key" ], "unique": true }
|
|
],
|
|
"pk": [ "site_id" ]
|
|
}
|
|
}
|