Last modified: 2014-01-03 15:47:46 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 T61327, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59327 - DBQ-72 distinct articles per user
DBQ-72 distinct articles per user
Status: RESOLVED FIXED
Product: Tool Labs tools
Classification: Unclassified
Database Queries (Other open bugs)
unspecified
All All
: Unprioritized major
: ---
Assigned To: Bugzilla Bug Importer (valhallasw)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-03 15:47 UTC by Bugzilla Bug Importer (valhallasw)
Modified: 2014-01-03 15:47 UTC (History)
0 users

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


Attachments

Description Bugzilla Bug Importer (valhallasw) 2014-01-03 15:47:40 UTC
This issue was converted from https://jira.toolserver.org/browse/DBQ-72.
Summary: distinct articles per user
Issue type: Task - A task that needs to be done.
Priority: Major
Status: Done
Assignee: (none)

-------------------------------------------------------------------------------
From: Nuno Tavares <nunotavares@hotmail.com>
Date: Wed, 19 Aug 2009 02:48:41
-------------------------------------------------------------------------------

We are trying to provide some statistics for studying. I've reached a query that may be used (by us) for that analysis, but it's pretty heavy. 

SELECT a.rev_user_text,p.page_namespace,COUNT(a.rev_page) AS artigos_distintos  
FROM (SELECT r.rev_user,r.rev_page,r.rev_user_text  
FROM wikidb_revision r   
GROUP BY r.rev_user,r.rev_page) AS a  
JOIN wikidb_user u ON u.user_id = a.rev_user  
JOIN wikidb_page p ON a.rev_page = p.page_id  
GROUP BY rev_user,p.page_namespace

Can this be run in the Query service? I've made some tests, and it seems it's better to use an external table, like this:

create table teste select r.rev_user, p.page_namespace, r.rev_page, count(1) AS edits  
from revision r  
JOIN page p ON r.rev_page = p.page_id  
GROUP BY r.rev_user,p.page_namespace,r.rev_page;

alter table teste add key idx_u (rev_user,page_namespace);

select straight_join u.user_name, page_namespace,count(1) as edits from teste  
join user u on u.user_id = rev_user  
group by rev_user,page_namespace;

Hope that helps.
Comment 1 Bugzilla Bug Importer (valhallasw) 2014-01-03 15:47:42 UTC
-------------------------------------------------------------------------------
From: mauro742 <mauro742@gmail.com>
Date: Tue, 27 Oct 2009 13:22:13
-------------------------------------------------------------------------------

Can you explain what do you obtain? I understand you want a list that reports foreach user the distinct numbers of edits foreach namespace. Is it right?
Comment 2 Bugzilla Bug Importer (valhallasw) 2014-01-03 15:47:44 UTC
-------------------------------------------------------------------------------
From: Nuno Tavares  <nunotavares@hotmail.com>
Date: Wed, 28 Oct 2009 20:22:20
-------------------------------------------------------------------------------

This issue has already been answered.... by myself. You can close this one.

Mauro, reference and explanation is at:  
http://gpshumano.blogs.dri.pt/2009/09/28/importing-wikimedia-dumps/

in portuguese, though. In english: you are right.
Comment 3 Bugzilla Bug Importer (valhallasw) 2014-01-03 15:47:46 UTC
This bug was imported as RESOLVED. The original assignee has therefore not been
set, and the original reporters/responders have not been added as CC, to
prevent bugspam.

If you re-open this bug, please consider adding these people to the CC list:
Original assignee: (none)
CC list: nunotavares@hotmail.com

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


Navigation
Links