* applyed the patch from bug 26393 (please comment on the bug page)
This commit is contained in:
parent
eb3a7e7e4e
commit
12dabfbc10
9 changed files with 27 additions and 13 deletions
|
|
@ -189,7 +189,8 @@ class MysqlUpdater extends DatabaseUpdater {
|
||||||
array( 'doMigrateUserOptions' ),
|
array( 'doMigrateUserOptions' ),
|
||||||
array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ),
|
array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ),
|
||||||
array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ),
|
array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ),
|
||||||
array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' )
|
array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ),
|
||||||
|
array( 'addIndex', 'page', 'page_redirect_namespace_len', 'patch-page_redirect_namespace_len.sql' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ class OracleUpdater extends DatabaseUpdater {
|
||||||
array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1_field.sql' ),
|
array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1_field.sql' ),
|
||||||
array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1_field.sql' ),
|
array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1_field.sql' ),
|
||||||
array( 'doRemoveNotNullEmptyDefaults2' ),
|
array( 'doRemoveNotNullEmptyDefaults2' ),
|
||||||
|
array( 'addIndex', 'page', 'i03', 'patch-page_redirect_namespace_len.sql' ),
|
||||||
|
|
||||||
// till 2.0 i guess
|
// till 2.0 i guess
|
||||||
array( 'doRebuildDuplicateFunction' ),
|
array( 'doRebuildDuplicateFunction' ),
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,9 @@ class SqliteUpdater extends DatabaseUpdater {
|
||||||
array( 'doMigrateUserOptions' ),
|
array( 'doMigrateUserOptions' ),
|
||||||
array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ),
|
array( 'dropField', 'user', 'user_options', 'patch-drop-user_options.sql' ),
|
||||||
array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ),
|
array( 'addField', 'revision', 'rev_sha1', 'patch-rev_sha1.sql' ),
|
||||||
array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' )
|
array( 'addField', 'archive', 'ar_sha1', 'patch-ar_sha1.sql' ),
|
||||||
|
array( 'addIndex', 'page', 'page_redirect_namespace_len', 'patch-page_redirect_namespace_len.sql' )
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,6 @@ class ShortPagesPage extends QueryPage {
|
||||||
parent::__construct( $name );
|
parent::__construct( $name );
|
||||||
}
|
}
|
||||||
|
|
||||||
// inexpensive?
|
|
||||||
/**
|
|
||||||
* This query is indexed as of 1.5
|
|
||||||
*/
|
|
||||||
function isExpensive() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isSyndicated() {
|
function isSyndicated() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -51,9 +43,9 @@ class ShortPagesPage extends QueryPage {
|
||||||
'fields' => array ( 'page_namespace AS namespace',
|
'fields' => array ( 'page_namespace AS namespace',
|
||||||
'page_title AS title',
|
'page_title AS title',
|
||||||
'page_len AS value' ),
|
'page_len AS value' ),
|
||||||
'conds' => array ( 'page_namespace' => MWNamespace::getContentNamespaces(),
|
'conds' => array ( 'page_namespace' => NS_MAIN,
|
||||||
'page_is_redirect' => 0 ),
|
'page_is_redirect' => 0 ),
|
||||||
'options' => array ( 'USE INDEX' => 'page_len' )
|
'options' => array ( 'USE INDEX' => 'page_redirect_namespaces_len' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
--
|
||||||
|
-- Add the page_redirect_namespace_len index
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE INDEX /*i*/page_redirect_namespace_len ON /*_*/page (page_is_redirect, page_namespace, page_len);
|
||||||
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
define mw_prefix='{$wgDBprefix}';
|
||||||
|
|
||||||
|
CREATE INDEX &mw_prefix.page_i03 ON &mw_prefix.page (page_is_redirect, page_namespace, page_len);
|
||||||
|
|
||||||
|
|
@ -79,6 +79,7 @@ ALTER TABLE &mw_prefix.page ADD CONSTRAINT &mw_prefix.page_pk PRIMARY KEY (page_
|
||||||
CREATE UNIQUE INDEX &mw_prefix.page_u01 ON &mw_prefix.page (page_namespace,page_title);
|
CREATE UNIQUE INDEX &mw_prefix.page_u01 ON &mw_prefix.page (page_namespace,page_title);
|
||||||
CREATE INDEX &mw_prefix.page_i01 ON &mw_prefix.page (page_random);
|
CREATE INDEX &mw_prefix.page_i01 ON &mw_prefix.page (page_random);
|
||||||
CREATE INDEX &mw_prefix.page_i02 ON &mw_prefix.page (page_len);
|
CREATE INDEX &mw_prefix.page_i02 ON &mw_prefix.page (page_len);
|
||||||
|
CREATE INDEX &mw_prefix.page_i03 ON &mw_prefix.page (page_is_redirect, page_namespace, page_len);
|
||||||
|
|
||||||
-- Create a dummy page to satisfy fk contraints especially with revisions
|
-- Create a dummy page to satisfy fk contraints especially with revisions
|
||||||
INSERT INTO &mw_prefix.page
|
INSERT INTO &mw_prefix.page
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
--
|
||||||
|
-- Add the page_redirect_namespace_len index
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE INDEX /*i*/page_redirect_namespace_len ON /*_*/page (page_is_redirect, page_namespace, page_len);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -265,7 +265,7 @@ CREATE TABLE /*_*/page (
|
||||||
CREATE UNIQUE INDEX /*i*/name_title ON /*_*/page (page_namespace,page_title);
|
CREATE UNIQUE INDEX /*i*/name_title ON /*_*/page (page_namespace,page_title);
|
||||||
CREATE INDEX /*i*/page_random ON /*_*/page (page_random);
|
CREATE INDEX /*i*/page_random ON /*_*/page (page_random);
|
||||||
CREATE INDEX /*i*/page_len ON /*_*/page (page_len);
|
CREATE INDEX /*i*/page_len ON /*_*/page (page_len);
|
||||||
|
CREATE INDEX /*i*/page_len_redirect_namespace ON /*_*/page (page_len, page_is_redirect, page_namespace);
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Every edit of a page creates also a revision row.
|
-- Every edit of a page creates also a revision row.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue