This issue was converted from https://jira.toolserver.org/browse/DBQ-7.
Summary: Shortpages without templates and a single contributor
Issue type: Task - A task that needs to be done.
Priority: Minor
Status: Done
Assignee: Andreas Gasser <andreas_gasser@yahoo.com>
From: MZMcBride <mzmcbride@gmail.com>
Date: Sun, 06 Jan 2008 01:22:25
I'd like a query run that can get a list of all shortpages on en.wiki that don't contain templates and only have a single contributor. Erwin provided me with the query he uses (below), however I've been told that it can probably be optimized or written in a more efficient manner. Thanks!
/usr/bin/mysql -hsql-s1 --skip-column-names enwiki_p > /home/erwin85/public_html/dbq/shortpages_enwiki.txt <<EOF
SELECT CONCAT(ns_name, ':', page_title, ' - ', page_len)
FROM page
LEFT JOIN toolserver.namespace
ON page_namespace = ns_id
WHERE page_len < 50
AND page_is_redirect = 0
AND page_namespace NOT IN (2, 3)
AND (SELECT COUNT(1) FROM templatelinks WHERE tl_from = page_id) = 0
AND (SELECT COUNT(DISTINCT rev_user_text) FROM revision WHERE rev_page = page_id) = 1
AND dbname = 'enwiki_p'
ORDER BY page_len ASC
EOF
Version: unspecified
Severity: minor