enforce join order for whatlinkshere queries - avoid filesorts at a cost of scanning more records for damn namespace selector
This commit is contained in:
parent
0be61ee338
commit
a52a3acd8b
1 changed files with 5 additions and 0 deletions
|
|
@ -112,6 +112,11 @@ class WhatLinksHerePage {
|
|||
|
||||
// Read an extra row as an at-end check
|
||||
$queryLimit = $limit + 1;
|
||||
|
||||
// enforce join order, sometimes namespace selector may
|
||||
// trigger filesorts which are far less efficient than scanning many entries
|
||||
$options[] = 'STRAIGHT_JOIN';
|
||||
|
||||
$options['LIMIT'] = $queryLimit;
|
||||
$fields = array( 'page_id', 'page_namespace', 'page_title', 'page_is_redirect' );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue