Index: trunk/extensions/Wikidata/Database scripts/Convenience/wikidataCoreTables.sql |
— | — | @@ -1,3 +1,38 @@ |
| 2 | +ALTER TABLE `archive` ENGINE = MyISAM; |
| 3 | +ALTER TABLE `categorylinks` ENGINE = MyISAM; |
| 4 | +ALTER TABLE `externallinks` ENGINE = MyISAM; |
| 5 | +ALTER TABLE `filearchive` ENGINE = MyISAM; |
| 6 | +ALTER TABLE `image` ENGINE = MyISAM; |
| 7 | +ALTER TABLE `imagelinks` ENGINE = MyISAM; |
| 8 | +ALTER TABLE `interwiki` ENGINE = MyISAM; |
| 9 | +ALTER TABLE `ipblocks` ENGINE = MyISAM; |
| 10 | +ALTER TABLE `job` ENGINE = MyISAM; |
| 11 | +ALTER TABLE `langlinks` ENGINE = MyISAM; |
| 12 | +ALTER TABLE `logging` ENGINE = MyISAM; |
| 13 | +ALTER TABLE `math` ENGINE = MyISAM; |
| 14 | +ALTER TABLE `namespace` ENGINE = MyISAM; |
| 15 | +ALTER TABLE `namespace_names` ENGINE = MyISAM; |
| 16 | +ALTER TABLE `objectcache` ENGINE = MyISAM; |
| 17 | +ALTER TABLE `oldimage` ENGINE = MyISAM; |
| 18 | +ALTER TABLE `page` ENGINE = MyISAM; |
| 19 | +ALTER TABLE `page_restrictions` ENGINE = MyISAM; |
| 20 | +ALTER TABLE `pagelinks` ENGINE = MyISAM; |
| 21 | +ALTER TABLE `querycache` ENGINE = MyISAM; |
| 22 | +ALTER TABLE `querycache_info` ENGINE = MyISAM; |
| 23 | +ALTER TABLE `querycachetwo` ENGINE = MyISAM; |
| 24 | +ALTER TABLE `recentchanges` ENGINE = MyISAM; |
| 25 | +ALTER TABLE `redirect` ENGINE = MyISAM; |
| 26 | +ALTER TABLE `revision` ENGINE = MyISAM; |
| 27 | +ALTER TABLE `site_stats` ENGINE = MyISAM; |
| 28 | +ALTER TABLE `templatelinks` ENGINE = MyISAM; |
| 29 | +ALTER TABLE `text` ENGINE = MyISAM; |
| 30 | +ALTER TABLE `trackbacks` ENGINE = MyISAM; |
| 31 | +ALTER TABLE `transcache` ENGINE = MyISAM; |
| 32 | +ALTER TABLE `user` ENGINE = MyISAM; |
| 33 | +ALTER TABLE `user_groups` ENGINE = MyISAM; |
| 34 | +ALTER TABLE `user_newtalk` ENGINE = MyISAM; |
| 35 | +ALTER TABLE `watchlist` ENGINE = MyISAM; |
| 36 | + |
2 | 37 | ALTER TABLE page MODIFY COLUMN page_restrictions TINYBLOB DEFAULT NULL; |
3 | 38 | ALTER TABLE page MODIFY COLUMN page_random DOUBLE UNSIGNED NOT NULL DEFAULT 0; |
4 | 39 | ALTER TABLE page MODIFY COLUMN page_latest INT(8) UNSIGNED NOT NULL DEFAULT 0; |
Index: trunk/extensions/Wikidata/Database scripts/Convenience/wikidataSourceTables.sql |
— | — | @@ -1,3 +1,21 @@ |
| 2 | +-- These tables can exist within each dataset. |
| 3 | +DROP TABLE IF EXISTS objects; |
| 4 | +DROP TABLE IF EXISTS bootstrapped_defined_meanings; |
| 5 | +DROP TABLE IF EXISTS translated_content; |
| 6 | +DROP TABLE IF EXISTS transactions; |
| 7 | + |
| 8 | +-- Drop table so that the next create doesn't crash |
| 9 | +DROP TABLE IF EXISTS `uw_text`; |
| 10 | + |
| 11 | +-- We used to share this with MediaWiki, but it makes more sense to |
| 12 | +-- have our own within each data set. |
| 13 | +CREATE TABLE `uw_text` ( |
| 14 | + `text_id` int(8) unsigned NOT NULL auto_increment, |
| 15 | + `text_text` mediumblob NOT NULL, |
| 16 | + `text_flags` tinyblob NOT NULL, |
| 17 | + PRIMARY KEY (`text_id`) |
| 18 | +) DEFAULT CHARSET=utf8; |
| 19 | + |
2 | 20 | DROP TABLE IF EXISTS /*$wgWDprefix*/alt_meaningtexts; |
3 | 21 | |
4 | 22 | CREATE TABLE /*$wgWDprefix*/alt_meaningtexts ( |
— | — | @@ -14,6 +32,14 @@ |
15 | 33 | KEY `versioned_start_source` (`add_transaction_id`,`source_id`,`meaning_mid`,`meaning_text_tcid`) |
16 | 34 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
17 | 35 | |
| 36 | +ALTER TABLE /*$wgWDprefix*/alt_meaningtexts |
| 37 | + ADD INDEX /*$wgWDprefix*/versioned_end_meaning (`remove_transaction_id`, `meaning_mid`, `meaning_text_tcid`, `source_id`), |
| 38 | + ADD INDEX /*$wgWDprefix*/versioned_end_text (`remove_transaction_id`, `meaning_text_tcid`, `meaning_mid`, `source_id`), |
| 39 | + ADD INDEX /*$wgWDprefix*/versioned_end_source (`remove_transaction_id`, `source_id`, `meaning_mid`, `meaning_text_tcid`), |
| 40 | + ADD INDEX /*$wgWDprefix*/versioned_start_meaning (`add_transaction_id`, `meaning_mid`, `meaning_text_tcid`, `source_id`), |
| 41 | + ADD INDEX /*$wgWDprefix*/versioned_start_text (`add_transaction_id`, `meaning_text_tcid`, `meaning_mid`, `source_id`), |
| 42 | + ADD INDEX /*$wgWDprefix*/versioned_start_source (`add_transaction_id`, `source_id`, `meaning_mid`, `meaning_text_tcid`); |
| 43 | + |
18 | 44 | DROP TABLE IF EXISTS /*$wgWDprefix*/bootstrapped_defined_meanings; |
19 | 45 | |
20 | 46 | CREATE TABLE /*$wgWDprefix*/bootstrapped_defined_meanings ( |
— | — | @@ -23,6 +49,10 @@ |
24 | 50 | KEY `unversioned_name` (`name`,`defined_meaning_id`) |
25 | 51 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
26 | 52 | |
| 53 | +ALTER TABLE /*$wgWDprefix*/bootstrapped_defined_meanings |
| 54 | + ADD INDEX /*$wgWDprefix*/unversioned_meaning (`defined_meaning_id`), |
| 55 | + ADD INDEX /*$wgWDprefix*/unversioned_name (`name` (255), `defined_meaning_id`); |
| 56 | + |
27 | 57 | INSERT INTO /*$wgWDprefix*/bootstrapped_defined_meanings (name,defined_meaning_id) VALUES |
28 | 58 | ('DefinedMeaning',49), |
29 | 59 | ('Definition',52), |
— | — | @@ -48,6 +78,14 @@ |
49 | 79 | KEY `versioned_start_object` (`add_transaction_id`,`object_id`) |
50 | 80 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
51 | 81 | |
| 82 | +ALTER TABLE /*$wgWDprefix*/class_attributes |
| 83 | + ADD INDEX /*$wgWDprefix*/versioned_end_class (`remove_transaction_id`, `class_mid`, `attribute_mid`, `object_id`), |
| 84 | + ADD INDEX /*$wgWDprefix*/versioned_end_attribute (`remove_transaction_id`, `attribute_mid`, `class_mid`, `object_id`), |
| 85 | + ADD INDEX /*$wgWDprefix*/versioned_end_object (`remove_transaction_id`, `object_id`), |
| 86 | + ADD INDEX /*$wgWDprefix*/versioned_start_class (`add_transaction_id`, `class_mid`, `attribute_mid`, `object_id`), |
| 87 | + ADD INDEX /*$wgWDprefix*/versioned_start_attribute (`add_transaction_id`, `attribute_mid`, `class_mid`, `object_id`), |
| 88 | + ADD INDEX /*$wgWDprefix*/versioned_start_object (`add_transaction_id`, `object_id`); |
| 89 | + |
52 | 90 | DROP TABLE IF EXISTS /*$wgWDprefix*/class_membership; |
53 | 91 | |
54 | 92 | CREATE TABLE /*$wgWDprefix*/class_membership ( |
— | — | @@ -64,6 +102,14 @@ |
65 | 103 | KEY `versioned_start_class_membership` (`add_transaction_id`,`class_membership_id`) |
66 | 104 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
67 | 105 | |
| 106 | +ALTER TABLE /*$wgWDprefix*/class_membership |
| 107 | + ADD INDEX /*$wgWDprefix*/versioned_end_class (`remove_transaction_id`, `class_mid`, `class_member_mid`), |
| 108 | + ADD INDEX /*$wgWDprefix*/versioned_end_class_member (`remove_transaction_id`, `class_member_mid`, `class_mid`), |
| 109 | + ADD INDEX /*$wgWDprefix*/versioned_end_class_membership (`remove_transaction_id`, `class_membership_id`), |
| 110 | + ADD INDEX /*$wgWDprefix*/versioned_start_class (`add_transaction_id`, `class_mid`, `class_member_mid`), |
| 111 | + ADD INDEX /*$wgWDprefix*/versioned_start_class_member (`add_transaction_id`, `class_member_mid`, `class_mid`), |
| 112 | + ADD INDEX /*$wgWDprefix*/versioned_start_class_membership (`add_transaction_id`, `class_membership_id`); |
| 113 | + |
68 | 114 | DROP TABLE IF EXISTS /*$wgWDprefix*/collection_contents; |
69 | 115 | |
70 | 116 | CREATE TABLE /*$wgWDprefix*/collection_contents ( |
— | — | @@ -81,6 +127,16 @@ |
82 | 128 | KEY `versioned_start_internal_id` (`add_transaction_id`,`internal_member_id`,`collection_id`,`member_mid`) |
83 | 129 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
84 | 130 | |
| 131 | +ALTER TABLE /*$wgWDprefix*/collection_contents |
| 132 | + ADD INDEX /*$wgWDprefix*/versioned_end_collection (`remove_transaction_id`, `collection_id`, `member_mid`), |
| 133 | + ADD INDEX /*$wgWDprefix*/versioned_end_collection_member (`remove_transaction_id`, `member_mid`, `collection_id`), |
| 134 | + ADD INDEX /*$wgWDprefix*/versioned_end_internal_id (`remove_transaction_id`, `internal_member_id` (255), `collection_id`, `member_mid`), |
| 135 | + ADD INDEX /*$wgWDprefix*/versioned_start_collection (`add_transaction_id`, `collection_id`, `member_mid`), |
| 136 | + ADD INDEX /*$wgWDprefix*/versioned_start_collection_member (`add_transaction_id`, `member_mid`, `collection_id`), |
| 137 | + ADD INDEX /*$wgWDprefix*/versioned_start_internal_id (`add_transaction_id`, `internal_member_id` (255), `collection_id`, `member_mid`), |
| 138 | + ADD INDEX /*$wgWDprefix*/collection_id_idx (`collection_id`), |
| 139 | + ADD INDEX /*$wgWDprefix*/member_mid_idx (`member_mid`); |
| 140 | + |
85 | 141 | DROP TABLE IF EXISTS /*$wgWDprefix*/collection_language; |
86 | 142 | |
87 | 143 | CREATE TABLE /*$wgWDprefix*/collection_language ( |
— | — | @@ -104,6 +160,14 @@ |
105 | 161 | KEY `versioned_start_collection_type` (`add_transaction_id`,`collection_type`,`collection_id`,`collection_mid`) |
106 | 162 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
107 | 163 | |
| 164 | +ALTER TABLE /*$wgWDprefix*/collection_ns |
| 165 | + ADD INDEX /*$wgWDprefix*/versioned_end_collection (`remove_transaction_id`, `collection_id`, `collection_mid`), |
| 166 | + ADD INDEX /*$wgWDprefix*/versioned_end_collection_meaning (`remove_transaction_id`, `collection_mid`, `collection_id`), |
| 167 | + ADD INDEX /*$wgWDprefix*/versioned_end_collection_type (`remove_transaction_id`, `collection_type` (4), `collection_id`, `collection_mid`), |
| 168 | + ADD INDEX /*$wgWDprefix*/versioned_start_collection (`add_transaction_id`, `collection_id`, `collection_mid`), |
| 169 | + ADD INDEX /*$wgWDprefix*/versioned_start_collection_meaning (`add_transaction_id`, `collection_mid`, `collection_id`), |
| 170 | + ADD INDEX /*$wgWDprefix*/versioned_start_collection_type (`add_transaction_id`, `collection_type` (4), `collection_id`, `collection_mid`); |
| 171 | + |
108 | 172 | DROP TABLE IF EXISTS /*$wgWDprefix*/defined_meaning; |
109 | 173 | |
110 | 174 | CREATE TABLE /*$wgWDprefix*/defined_meaning ( |
— | — | @@ -120,6 +184,15 @@ |
121 | 185 | KEY `versioned_start_meaning_text` (`add_transaction_id`,`meaning_text_tcid`,`defined_meaning_id`) |
122 | 186 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
123 | 187 | |
| 188 | +ALTER TABLE /*$wgWDprefix*/defined_meaning |
| 189 | + ADD INDEX /*$wgWDprefix*/versioned_end_meaning (`remove_transaction_id`, `defined_meaning_id`, `expression_id`), |
| 190 | + ADD INDEX /*$wgWDprefix*/versioned_end_expression (`remove_transaction_id`, `expression_id`, `defined_meaning_id`), |
| 191 | + ADD INDEX /*$wgWDprefix*/versioned_end_meaning_text (`remove_transaction_id`, `meaning_text_tcid`, `defined_meaning_id`), |
| 192 | + ADD INDEX /*$wgWDprefix*/versioned_start_meaning (`add_transaction_id`, `defined_meaning_id`, `expression_id`), |
| 193 | + ADD INDEX /*$wgWDprefix*/versioned_start_expression (`add_transaction_id`, `expression_id`, `defined_meaning_id`), |
| 194 | + ADD INDEX /*$wgWDprefix*/versioned_start_meaning_text (`add_transaction_id`, `meaning_text_tcid`, `defined_meaning_id`), |
| 195 | + ADD INDEX /*$wgWDprefix*/defined_meaning_idx (`defined_meaning_id`); |
| 196 | + |
124 | 197 | DROP TABLE IF EXISTS /*$wgWDprefix*/expression_ns; |
125 | 198 | |
126 | 199 | CREATE TABLE /*$wgWDprefix*/expression_ns ( |
— | — | @@ -137,6 +210,17 @@ |
138 | 211 | KEY `versioned_start_spelling` (`add_transaction_id`,`spelling`,`expression_id`,`language_id`) |
139 | 212 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
140 | 213 | |
| 214 | +ALTER TABLE /*$wgWDprefix*/expression_ns |
| 215 | + ADD INDEX /*$wgWDprefix*/versioned_end_expression (`remove_transaction_id`, `expression_id`, `language_id`), |
| 216 | + ADD INDEX /*$wgWDprefix*/versioned_end_language (`remove_transaction_id`, `language_id`, `expression_id`), |
| 217 | + ADD INDEX /*$wgWDprefix*/versioned_end_spelling (`remove_transaction_id`, `spelling` (255), `expression_id`, `language_id`), |
| 218 | + ADD INDEX /*$wgWDprefix*/versioned_start_expression (`add_transaction_id`, `expression_id`, `language_id`), |
| 219 | + ADD INDEX /*$wgWDprefix*/versioned_start_language (`add_transaction_id`, `language_id`, `expression_id`), |
| 220 | + ADD INDEX /*$wgWDprefix*/versioned_start_spelling (`add_transaction_id`, `spelling` (255), `expression_id`, `language_id`), |
| 221 | + ADD INDEX /*$wgWDprefix*/expressions_unique_idx (`expression_id`,`language_id`), |
| 222 | + ADD INDEX /*$wgWDprefix*/expressions_idx (`expression_id`), |
| 223 | + ADD INDEX /*$wgWDprefix*/language_idx (`language_id`); |
| 224 | + |
141 | 225 | DROP TABLE IF EXISTS /*$wgWDprefix*/meaning_relations; |
142 | 226 | |
143 | 227 | CREATE TABLE /*$wgWDprefix*/meaning_relations ( |
— | — | @@ -154,6 +238,14 @@ |
155 | 239 | KEY `versioned_start_relation` (`add_transaction_id`,`relation_id`) |
156 | 240 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
157 | 241 | |
| 242 | +ALTER TABLE /*$wgWDprefix*/meaning_relations |
| 243 | + ADD INDEX /*$wgWDprefix*/versioned_end_outgoing (`remove_transaction_id`, `meaning1_mid`, `relationtype_mid`, `meaning2_mid`), |
| 244 | + ADD INDEX /*$wgWDprefix*/versioned_end_incoming (`remove_transaction_id`, `meaning2_mid`, `relationtype_mid`, `meaning1_mid`), |
| 245 | + ADD INDEX /*$wgWDprefix*/versioned_end_relation (`remove_transaction_id`, `relation_id`), |
| 246 | + ADD INDEX /*$wgWDprefix*/versioned_start_outgoing (`add_transaction_id`, `meaning1_mid`, `relationtype_mid`, `meaning2_mid`), |
| 247 | + ADD INDEX /*$wgWDprefix*/versioned_start_incoming (`add_transaction_id`, `meaning2_mid`, `relationtype_mid`, `meaning1_mid`), |
| 248 | + ADD INDEX /*$wgWDprefix*/versioned_start_relation (`add_transaction_id`, `relation_id`); |
| 249 | + |
158 | 250 | DROP TABLE IF EXISTS /*$wgWDprefix*/objects; |
159 | 251 | |
160 | 252 | CREATE TABLE /*$wgWDprefix*/objects ( |
— | — | @@ -183,6 +275,14 @@ |
184 | 276 | KEY `versioned_start_id` (`add_transaction_id`,`option_id`) |
185 | 277 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
186 | 278 | |
| 279 | +ALTER TABLE /*$wgWDprefix*/option_attribute_options |
| 280 | + ADD INDEX /*$wgWDprefix*/versioned_end_option (`remove_transaction_id`, `option_mid`, `attribute_id`, `option_id`), |
| 281 | + ADD INDEX /*$wgWDprefix*/versioned_end_attribute (`remove_transaction_id`, `attribute_id`, `option_id`, `option_mid`), |
| 282 | + ADD INDEX /*$wgWDprefix*/versioned_end_id (`remove_transaction_id`, `option_id`), |
| 283 | + ADD INDEX /*$wgWDprefix*/versioned_start_option (`add_transaction_id`, `option_mid`, `attribute_id`, `option_id`), |
| 284 | + ADD INDEX /*$wgWDprefix*/versioned_start_attribute (`add_transaction_id`, `attribute_id`, `option_id`, `option_mid`), |
| 285 | + ADD INDEX /*$wgWDprefix*/versioned_start_id (`add_transaction_id`, `option_id`); |
| 286 | + |
187 | 287 | DROP TABLE IF EXISTS /*$wgWDprefix*/option_attribute_values; |
188 | 288 | |
189 | 289 | CREATE TABLE /*$wgWDprefix*/option_attribute_values ( |
— | — | @@ -199,6 +299,14 @@ |
200 | 300 | KEY `versioned_start_value` (`add_transaction_id`,`value_id`) |
201 | 301 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
202 | 302 | |
| 303 | +ALTER TABLE /*$wgWDprefix*/option_attribute_values |
| 304 | + ADD INDEX /*$wgWDprefix*/versioned_end_object (`remove_transaction_id`, `object_id`, `option_id`, `value_id`), |
| 305 | + ADD INDEX /*$wgWDprefix*/versioned_end_option (`remove_transaction_id`, `option_id`, `object_id`, `value_id`), |
| 306 | + ADD INDEX /*$wgWDprefix*/versioned_end_value (`remove_transaction_id`, `value_id`), |
| 307 | + ADD INDEX /*$wgWDprefix*/versioned_start_object (`add_transaction_id`, `object_id`, `option_id`, `value_id`), |
| 308 | + ADD INDEX /*$wgWDprefix*/versioned_start_option (`add_transaction_id`, `option_id`, `object_id`, `value_id`), |
| 309 | + ADD INDEX /*$wgWDprefix*/versioned_start_value (`add_transaction_id`, `value_id`); |
| 310 | + |
203 | 311 | DROP TABLE IF EXISTS /*$wgWDprefix*/script_log; |
204 | 312 | |
205 | 313 | CREATE TABLE /*$wgWDprefix*/script_log ( |
— | — | @@ -226,6 +334,17 @@ |
227 | 335 | KEY `versioned_start_defined_meaning` (`add_transaction_id`,`defined_meaning_id`,`identical_meaning`,`expression_id`) |
228 | 336 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
229 | 337 | |
| 338 | +ALTER TABLE /*$wgWDprefix*/syntrans |
| 339 | + ADD INDEX /*$wgWDprefix*/versioned_end_syntrans (`remove_transaction_id`, `syntrans_sid`), |
| 340 | + ADD INDEX /*$wgWDprefix*/versioned_end_expression (`remove_transaction_id`, `expression_id`, `identical_meaning`, `defined_meaning_id`), |
| 341 | + ADD INDEX /*$wgWDprefix*/versioned_end_defined_meaning (`remove_transaction_id`, `defined_meaning_id`, `identical_meaning`, `expression_id`), |
| 342 | + ADD INDEX /*$wgWDprefix*/versioned_start_syntrans (`add_transaction_id`, `syntrans_sid`), |
| 343 | + ADD INDEX /*$wgWDprefix*/versioned_start_expression (`add_transaction_id`, `expression_id`, `identical_meaning`, `defined_meaning_id`), |
| 344 | + ADD INDEX /*$wgWDprefix*/versioned_start_defined_meaning (`add_transaction_id`, `defined_meaning_id`, `identical_meaning`, `expression_id`), |
| 345 | + ADD INDEX /*$wgWDprefix*/syntrans_defined_meaning_idx (`defined_meaning_id`), |
| 346 | + ADD INDEX /*$wgWDprefix*/syntrans_expression_id_idx (`expression_id`), |
| 347 | + ADD INDEX /*$wgWDprefix*/syntrans_remove_transaction_idx (`remove_transaction_id`); |
| 348 | + |
230 | 349 | DROP TABLE IF EXISTS /*$wgWDprefix*/syntrans_relations; |
231 | 350 | |
232 | 351 | CREATE TABLE /*$wgWDprefix*/syntrans_relations ( |
— | — | @@ -260,6 +379,14 @@ |
261 | 380 | KEY `versioned_start_value` (`add_transaction_id`,`value_id`) |
262 | 381 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
263 | 382 | |
| 383 | +ALTER TABLE /*$wgWDprefix*/text_attribute_values |
| 384 | + ADD INDEX /*$wgWDprefix*/versioned_end_object (`remove_transaction_id`, `object_id`, `attribute_mid`, `value_id`), |
| 385 | + ADD INDEX /*$wgWDprefix*/versioned_end_attribute (`remove_transaction_id`, `attribute_mid`, `object_id`, `value_id`), |
| 386 | + ADD INDEX /*$wgWDprefix*/versioned_end_value (`remove_transaction_id`, `value_id`), |
| 387 | + ADD INDEX /*$wgWDprefix*/versioned_start_object (`add_transaction_id`, `object_id`, `attribute_mid`, `value_id`), |
| 388 | + ADD INDEX /*$wgWDprefix*/versioned_start_attribute (`add_transaction_id`, `attribute_mid`, `object_id`, `value_id`), |
| 389 | + ADD INDEX /*$wgWDprefix*/versioned_start_value (`add_transaction_id`, `value_id`); |
| 390 | + |
264 | 391 | DROP TABLE IF EXISTS /*$wgWDprefix*/transactions; |
265 | 392 | |
266 | 393 | CREATE TABLE /*$wgWDprefix*/transactions ( |
— | — | @@ -272,6 +399,9 @@ |
273 | 400 | KEY `user` (`user_id`,`transaction_id`) |
274 | 401 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
275 | 402 | |
| 403 | +ALTER TABLE /*$wgWDprefix*/transactions |
| 404 | + ADD INDEX /*$wgWDprefix*/user (`user_id`, `transaction_id`); |
| 405 | + |
276 | 406 | DROP TABLE IF EXISTS /*$wgWDprefix*/translated_content; |
277 | 407 | |
278 | 408 | CREATE TABLE /*$wgWDprefix*/translated_content ( |
— | — | @@ -288,6 +418,12 @@ |
289 | 419 | KEY `versioned_start_text` (`add_transaction_id`,`text_id`,`translated_content_id`,`language_id`) |
290 | 420 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8; |
291 | 421 | |
| 422 | +ALTER TABLE /*$wgWDprefix*/translated_content |
| 423 | + ADD INDEX /*$wgWDprefix*/versioned_end_translated_content (`remove_transaction_id`, `translated_content_id`, `language_id`, `text_id`), |
| 424 | + ADD INDEX /*$wgWDprefix*/versioned_end_text (`remove_transaction_id`, `text_id`, `translated_content_id`, `language_id`), |
| 425 | + ADD INDEX /*$wgWDprefix*/versioned_start_translated_content (`add_transaction_id`, `translated_content_id`, `language_id`, `text_id`), |
| 426 | + ADD INDEX /*$wgWDprefix*/versioned_start_text (`add_transaction_id`, `text_id`, `translated_content_id`, `language_id`); |
| 427 | + |
292 | 428 | DROP TABLE IF EXISTS /*$wgWDprefix*/translated_content_attribute_values; |
293 | 429 | |
294 | 430 | CREATE TABLE /*$wgWDprefix*/translated_content_attribute_values ( |
— | — | @@ -307,6 +443,16 @@ |
308 | 444 | KEY `versioned_start_value` (`add_transaction_id`,`value_id`) |
309 | 445 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
310 | 446 | |
| 447 | +ALTER TABLE /*$wgWDprefix*/translated_content_attribute_values |
| 448 | + ADD INDEX /*$wgWDprefix*/versioned_end_object (`remove_transaction_id`, `object_id`, `attribute_mid`, `value_tcid`), |
| 449 | + ADD INDEX /*$wgWDprefix*/versioned_end_attribute (`remove_transaction_id`, `attribute_mid`, `object_id`, `value_tcid`), |
| 450 | + ADD INDEX /*$wgWDprefix*/versioned_end_translated_content (`remove_transaction_id`, `value_tcid`, `value_id`), |
| 451 | + ADD INDEX /*$wgWDprefix*/versioned_end_value (`remove_transaction_id`, `value_id`), |
| 452 | + ADD INDEX /*$wgWDprefix*/versioned_start_object (`add_transaction_id`, `object_id`, `attribute_mid`, `value_tcid`), |
| 453 | + ADD INDEX /*$wgWDprefix*/versioned_start_attribute (`add_transaction_id`, `attribute_mid`, `object_id`, `value_tcid`), |
| 454 | + ADD INDEX /*$wgWDprefix*/versioned_start_translated_content (`add_transaction_id`, `value_tcid`, `value_id`), |
| 455 | + ADD INDEX /*$wgWDprefix*/versioned_start_value (`add_transaction_id`, `value_id`); |
| 456 | + |
311 | 457 | DROP TABLE IF EXISTS /*$wgWDprefix*/url_attribute_values; |
312 | 458 | |
313 | 459 | CREATE TABLE /*$wgWDprefix*/url_attribute_values ( |
— | — | @@ -324,3 +470,13 @@ |
325 | 471 | KEY `versioned_start_attribute` (`add_transaction_id`,`attribute_mid`,`object_id`,`value_id`), |
326 | 472 | KEY `versioned_start_value` (`add_transaction_id`,`value_id`) |
327 | 473 | ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
| 474 | + |
| 475 | +ALTER TABLE /*$wgWDprefix*/url_attribute_values |
| 476 | + ADD INDEX /*$wgWDprefix*/versioned_end_object (`remove_transaction_id`, `object_id`, `attribute_mid`, `value_id`), |
| 477 | + ADD INDEX /*$wgWDprefix*/versioned_end_attribute (`remove_transaction_id`, `attribute_mid`, `object_id`, `value_id`), |
| 478 | + ADD INDEX /*$wgWDprefix*/versioned_end_value (`remove_transaction_id`, `value_id`), |
| 479 | + ADD INDEX /*$wgWDprefix*/versioned_start_object (`add_transaction_id`, `object_id`, `attribute_mid`, `value_id`), |
| 480 | + ADD INDEX /*$wgWDprefix*/versioned_start_attribute (`add_transaction_id`, `attribute_mid`, `object_id`, `value_id`), |
| 481 | + ADD INDEX /*$wgWDprefix*/versioned_start_value (`add_transaction_id`, `value_id`); |
| 482 | + |
| 483 | + |