Last modified: 2011-03-13 18:04:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 16378 - API: Way to get all pages started by a given user
API: Way to get all pages started by a given user
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-18 05:15 UTC by David
Modified: 2011-03-13 18:04 UTC (History)
5 users (show)

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


Attachments

Description David 2008-11-18 05:15:02 UTC
I would like a way to find all articles started by a given user via api.php.  In other words, when listing usercontribs, have the ucshow param accept "new" as a value, in addition to minor.
Comment 1 Bryan Tong Minh 2008-11-18 09:43:10 UTC
That's not efficiently possible.
Comment 2 Roan Kattouw 2008-11-18 13:47:14 UTC
(In reply to comment #1)
> That's not efficiently possible.
> 

To elaborate on that a bit: whether a contribution or revision is "new" (i.e. the first revision of a page) isn't stored anywhere. The only way to find out is to go through all revisions of the same page and see if there's an older one. Combine that with a huge revision table (250M on enwiki) and very busy database servers and you'll get overloaded database servers slowing down Wikipedia, possibly to the point of unresponsiveness.
Comment 3 David 2008-11-18 17:26:05 UTC
Thank you for the comments, I appreciate the explanation.

I'll reopen this bug (just this once), to request it be marked for future development, because I would find this functionality useful on Wikipedia and also on my installation of MediaWiki.

I've used a query like this to find out who is the creator of a given page, but that won't be of much use to find all pages started by a given user:

SELECT p.page_id AS page_id, MIN(r.rev_id) AS first_revision_id, r.rev_user as user_id
FROM page AS p 
LEFT JOIN revision AS r ON(p.page_id = r.rev_page)
WHERE p.page_title = 'Title'

How about storing the user id of the person who made the first revision of each page right in the page table? page_first_user or so?  What would the downsides of doing something like that be?

Thanks.
Comment 4 Roan Kattouw 2008-11-18 19:12:35 UTC
(In reply to comment #3)
> I've used a query like this to find out who is the creator of a given page, but
> that won't be of much use to find all pages started by a given user:
> 
> SELECT p.page_id AS page_id, MIN(r.rev_id) AS first_revision_id, r.rev_user as
> user_id
> FROM page AS p 
> LEFT JOIN revision AS r ON(p.page_id = r.rev_page)
> WHERE p.page_title = 'Title'
You'd have to repeat that query op to 5,000 times, once for every page queried. The database servers aren't gonna like that.

> How about storing the user id of the person who made the first revision of each
> page right in the page table? page_first_user or so?  What would the downsides
> of doing something like that be?
Such a field would be of limited use (only useful for this query and pretty much nothing else). Also, the 'creator' of a page can change (in theory; doesn't happen much in practice I guess), and the conditions under which that happens aren't easily detectable. All in all, I'd say it wouldn't be worthwhile to add such a rarely used field.

> I'll reopen this bug (just this once), to request it be marked for future
> development, because I would find this functionality useful on Wikipedia and
> also on my installation of MediaWiki.
If you really wanna go through with requesting page_first_user or another database field or index to facilitate this feature, you should file a separate bug for that. Closing this one as WONTFIX again.

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


Navigation
Links