Web browser: ---
            Bug ID: 59260
           Summary: DBQ-7 Shortpages without templates and a single
           Product: Tool Labs tools
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: Unprioritized
         Component: Database Queries
    Classification: Unclassified
   Mobile Platform: ---

This issue was converted from
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 <>

From: MZMcBride <>
Date: Sun, 06 Jan 2008 01:22:25

I'd like a query run that can get a list of all shortpages on 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  

You are receiving this mail because:
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to