// Is there either one namespace selected or excluded?
// Tag filtering also has a better index.
// Also, if this is "all" or main namespace, just use timestamp index.
- if( is_null($namespace) || $invert || $opts['tagfilter'] ) {
+ if( is_null($namespace)
+ || $invert
+ || $opts['tagfilter']
+ || !$dbr->unionSupportsOrderAndLimit() )
+ {
$res = $dbr->select( $tables, '*', $conds, __METHOD__,
array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) +
$query_options,