Last modified: 2009-01-27 13:03:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18483, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16483 - Second query of ApiQueryBackLinks filesorts
Second query of ApiQueryBackLinks filesorts
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.14.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-28 11:38 UTC by Bryan Tong Minh
Modified: 2009-01-27 13:03 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bryan Tong Minh 2008-11-28 11:38:28 UTC
See https://wikitech.leuksman.com/index.php?title=Server_admin_log&diff=17574&oldid=17573

An explain on the example query in the code gives:

mysql> EXPLAIN SELECT page_id, page_title, page_namespace, page_is_redirect, pl_title, pl_namespace FROM pagelinks, page WHERE pl_from=page_id AND (pl_title='Foo' AND pl_namespace=0) OR (pl_title='Bar' AND pl_namespace=1) ORDER BY pl_namespace, pl_title, pl_from LIMIT 500;
+----+-------------+-----------+-------+----------------------+--------------+---------+------+----------+-----------------------------------------------------------+
| id | select_type | table     | type  | possible_keys        | key          | key_len | ref  | rows     | Extra                                                     |
+----+-------------+-----------+-------+----------------------+--------------+---------+------+----------+-----------------------------------------------------------+
|  1 | SIMPLE      | pagelinks | range | pl_from,pl_namespace | pl_namespace | 261     | NULL |      557 | Using where; Using index; Using temporary; Using filesort |
|  1 | SIMPLE      | page      | ALL   | PRIMARY              | NULL         | NULL    | NULL | 15734439 | Using where                                               |
+----+-------------+-----------+-------+----------------------+--------------+---------+------+----------+-----------------------------------------------------------+
2 rows in set (0.01 sec)

A filesort of 557 rows does not seem much, but I don't know how the row number is related to the requested page.
Comment 1 Roan Kattouw 2009-01-24 13:01:56 UTC
Fixed in r46134. The query was missing parentheses around the OR, which caused it to mean something different. Adding these parentheses kills the filesort.
Comment 2 Brion Vibber 2009-01-26 23:00:02 UTC
Release notes not updated.
Comment 3 Roan Kattouw 2009-01-27 13:03:55 UTC
(In reply to comment #2)
> Release notes not updated.
> 

Re-closing, as release notes aren't what this bug is about. This kind of stuff belongs on CR (where you put it as well; I replied there).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links