Last modified: 2012-04-16 09:15:33 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 T28311, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 26311 - prop module is using pageids not titles for sorting
prop module is using pageids not titles for sorting
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Roan Kattouw
http://en.wikipedia.org/w/api.php?act...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-12-12 13:20 UTC by Umherirrender
Modified: 2012-04-16 09:15 UTC (History)
5 users (show)

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


Attachments

Description Umherirrender 2010-12-12 13:20:37 UTC
The prop modules are using pageids for internal order, not the title (alphabetically).

You will see this, when using generator with a prop (example url): The <templates> tag is first added to the <page> tag with the lowerst pageid, not for the first <page> tag in the list.

In my opinion is that not a intuitive order. It is possible to change that order? Thanks.
Comment 1 Roan Kattouw 2010-12-12 13:52:33 UTC
(In reply to comment #0)
> In my opinion is that not a intuitive order.
I agree.

> It is possible to change that
> order?
Not without melting the database :(
Comment 2 Bryan Tong Minh 2010-12-12 13:53:36 UTC
We are sorting on page_id, because that is an indexed field in the database. It could be possible to sort on (page_namespace, page_title) probably as that is indexed as well. However I don't know what performance consequences that has. Intuitively I would say that sorting on an int is faster than on a varchar.
Comment 3 Roan Kattouw 2010-12-12 14:15:12 UTC
(In reply to comment #2)
> We are sorting on page_id, because that is an indexed field in the database. It
> could be possible to sort on (page_namespace, page_title) probably as that is
> indexed as well. However I don't know what performance consequences that has.
> Intuitively I would say that sorting on an int is faster than on a varchar.
That's not it. In the case of prop=links, we're sorting by pl_from (which references page_id), then pl_namespace then pl_title. To accomplish the behavior the reporter is asking for, we'd have to sort by (page_namespace, page_title, pl_namespace, pl_title), and sorting on fields spread across multiple tables isn't indexed.
Comment 4 Umherirrender 2010-12-13 19:34:16 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > It is possible to change that
> > order?
> Not without melting the database :(

Thanks for that informationen, that is not possible with the current database layout.


Creating a view with a index of that rows, is not a better solution? Thanks.
Comment 5 Roan Kattouw 2010-12-13 22:25:15 UTC
> Creating a view with a index of that rows, is not a better solution? Thanks.
You can't create indexes on views, AFAIK
Comment 6 Sam Reed (reedy) 2010-12-13 23:11:25 UTC
Looks to be the case

http://forums.mysql.com/read.php?100,42780,42780

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


Navigation
Links