Last modified: 2013-03-14 13:59:39 UTC
Sometimes I would like to see a list of pages I have recently edited. Special:Contributions does this, but if I've edited the same page multiple times then it appears multiple times in the list. "Only show edits that are latest revisions" guarantees that each page appears only once in the list, but if somebody has edited the page since the user whose contributions I am viewing, that page doesn't appear in the list at all. It would therefore be nice to have another option here: "Only show edits that are the user's last edit to the page" I don't know how the "Only show edits that are latest revisions" filter works internally, but if it just adds to the query the condition "no newer edits to [page] exist", then it probably wouldn't be difficult to do "no newer edits to [page] by [user] exist" along the same lines.
I don't think this can be done efficiently. (Like certainly it would be possible to on the php side, look through all the contribs we're about to output, and remove duplicates. However if a person edited a page once, then edited again 20 000 edits later (so that the two contribs are not on the same page when going through special:contribs 50 contribs at a time), it would be very difficult to make it so only one of those appeared.
How does it do "Only show edits that are latest revisions" efficiently enough? Maybe knowing the database structure would help to put it in better perspective.
Database structure is documented at [[mw:Manual:Revision_table]] and [[mw:Manual:Page_table]]. Only show latest edits does an inner join from revision table to page table on rev_id = page_latest .