Page MenuHomePhabricator

GUC query performance regressed 100x from <3s to 80-300s
Closed, ResolvedPublic

Description

I'm not sure what happened, but as of about two weeks, the queries ran by GUC seem to hit a snag somewhere. It now quite often takes anywhere from 80s to over 250s for a request to get a response where previously the same requests came back in just a second or two.

Example: https://tools.wmflabs.org/guc/?user=Krinkle&debug=true

Using GUC's debug mode to print information about connections and queries, I see that in most cases the biggest part of the delay is from a single query, usually the first "user" query.

This is odd, for a number of reasons.

  1. The first database listed doesn't appear be technically different from the others (relatively small wiki and less than 50 rows in total for that username).
  1. The first "user" query is not the first query overall on that connection, so it's not about being the first query.
  1. The given query is relatively simple compared to the much bigger query before it. See below, "Query all wikis for matching revisions" is a huge union query across 100+ wikis at once for the revision tables, taking only <70ms. Then after that is a user table query for one database, taking 88 seconds?

Debug sample 1/2:

+0s: Got input, start search
+0s: Get list of all wikis
+0s: Create connection to s1.web.db.svc.eqiad.wmflabs
+0.07s: Query all wikis for matching revisions
+88.97s: Query user data for ab.wikipedia.org
+0.03s: Query contributions on ab.wikipedia.org
+0.05s: Query user data for ace.wikipedia.org
+0.03s: Query contributions on ace.wikipedia.org
+0.03s: Query user data for ady.wikipedia.org
+0.03s: Query contributions on ady.wikipedia.org
+0.03s: Query user data for af.wikipedia.org
+0.04s: Query contributions on af.wikipedia.org
...
... etc., etc. –  800 times more for other wikis

Debug sample 2/2:

+0s: Got input, start search
+0s: Get list of all wikis
+0s: Create connection to s1.web.db.svc.eqiad.wmflabs
+0.05s: Query all wikis for matching revisions
+20.95s: Query user data for ab.wikipedia.org
+0.03s: Query contributions on ab.wikipedia.org
+0.08s: Query user data for ace.wikipedia.org
+0.02s: Query contributions on ace.wikipedia.org
+0.03s: Query user data for ady.wikipedia.org
...
... etc., etc.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 435653 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[labs/tools/guc@master] Add slice-level timing for revision matching

https://gerrit.wikimedia.org/r/435653

Oops, misunderstood the way the debug values are computed in GUC's profiling code. The +Xs part actually indicates the time since the previous point (with the first confusingly being hardcoded to +0).

So the time is actually spent where I'd expect it to be spent: The first and biggest query, "Query all wikis for matching revisions".

Given this is a many-wiki query for revision rows, makes a lot more sense as something that'd be slowed down by MCR changes (as opposed to the single-wiki query for the user table). I'll see if I can narrow down if it's specific to a particular slice, but in any event, here is the query in question:

https://github.com/wikimedia/labs-tools-guc/blob/d497db6b1895d37d7f7378f17d2ef15db22c8d80/src/Main.php#L145-L204

Change 435653 merged by jenkins-bot:
[labs/tools/guc@master] Add slice-level timing for revision matching

https://gerrit.wikimedia.org/r/435653

Krinkle added a comment.EditedMay 26 2018, 9:34 PM
+0s: Got input, start search
+0s: Get list of all wikis
+0s: Create connection to s1.web.db.svc.eqiad.wmflabs
+0.06s: Query all wikis for matching revisions
+0s: Quering wikis on `s3.labsdb` for matching revisions
+0s: [SQL] SELECT COUNT(rev_id) AS counter, 'abwiki' AS dbname FROM abwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'acewiki' AS dbname FROM acewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'adywiki' AS dbname FROM adywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'afwiki' AS dbname FROM afwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'afwikibooks' AS dbname FROM afwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'afwikiquote' AS dbname FROM afwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'afwiktionary' AS dbname FROM afwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'akwiki' AS dbname FROM akwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'alswiki' AS dbname FROM alswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'amwiki' AS dbname FROM amwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'amwikimedia' AS dbname FROM amwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'amwiktionary' AS dbname FROM amwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'angwiki' AS dbname FROM angwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'angwiktionary' AS dbname FROM angwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'anwiki' AS dbname FROM anwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'anwiktionary' AS dbname FROM anwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'arcwiki' AS dbname FROM arcwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'arwikibooks' AS dbname FROM arwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'arwikimedia' AS dbname FROM arwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'arwikinews' AS dbname FROM arwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'arwikiquote' AS dbname FROM arwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'arwikisource' AS dbname FROM arwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'arwikiversity' AS dbname FROM arwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'arwiktionary' AS dbname FROM arwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'arzwiki' AS dbname FROM arzwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'astwiki' AS dbname FROM astwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'astwiktionary' AS dbname FROM astwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'aswiki' AS dbname FROM aswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'aswikisource' AS dbname FROM aswikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'atjwiki' AS dbname FROM atjwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'avwiki' AS dbname FROM avwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'aywiki' AS dbname FROM aywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'aywiktionary' AS dbname FROM aywiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'azbwiki' AS dbname FROM azbwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'azwiki' AS dbname FROM azwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'azwikibooks' AS dbname FROM azwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'azwikiquote' AS dbname FROM azwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'azwikisource' AS dbname FROM azwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'azwiktionary' AS dbname FROM azwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'barwiki' AS dbname FROM barwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bat_smgwiki' AS dbname FROM bat_smgwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bawiki' AS dbname FROM bawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bawikibooks' AS dbname FROM bawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bclwiki' AS dbname FROM bclwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bdwikimedia' AS dbname FROM bdwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'betawikiversity' AS dbname FROM betawikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bewiki' AS dbname FROM bewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bewikibooks' AS dbname FROM bewikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bewikimedia' AS dbname FROM bewikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bewikiquote' AS dbname FROM bewikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bewikisource' AS dbname FROM bewikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bewiktionary' AS dbname FROM bewiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'be_x_oldwiki' AS dbname FROM be_x_oldwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bgwikibooks' AS dbname FROM bgwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bgwikinews' AS dbname FROM bgwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bgwikiquote' AS dbname FROM bgwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bgwikisource' AS dbname FROM bgwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bhwiki' AS dbname FROM bhwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'biwiki' AS dbname FROM biwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bjnwiki' AS dbname FROM bjnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bmwiki' AS dbname FROM bmwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bnwiki' AS dbname FROM bnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bnwikibooks' AS dbname FROM bnwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bnwikisource' AS dbname FROM bnwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bnwiktionary' AS dbname FROM bnwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bowiki' AS dbname FROM bowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bpywiki' AS dbname FROM bpywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'brwiki' AS dbname FROM brwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'brwikimedia' AS dbname FROM brwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'brwikiquote' AS dbname FROM brwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'brwikisource' AS dbname FROM brwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'brwiktionary' AS dbname FROM brwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bswiki' AS dbname FROM bswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bswikibooks' AS dbname FROM bswikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bswikinews' AS dbname FROM bswikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bswikiquote' AS dbname FROM bswikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bswikisource' AS dbname FROM bswikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bswiktionary' AS dbname FROM bswiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bugwiki' AS dbname FROM bugwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'bxrwiki' AS dbname FROM bxrwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cawikibooks' AS dbname FROM cawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cawikimedia' AS dbname FROM cawikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cawikinews' AS dbname FROM cawikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cawikiquote' AS dbname FROM cawikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cawikisource' AS dbname FROM cawikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cawiktionary' AS dbname FROM cawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cbk_zamwiki' AS dbname FROM cbk_zamwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cdowiki' AS dbname FROM cdowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cebwiki' AS dbname FROM cebwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cewiki' AS dbname FROM cewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'chrwiki' AS dbname FROM chrwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'chrwiktionary' AS dbname FROM chrwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'chwiki' AS dbname FROM chwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'chywiki' AS dbname FROM chywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ckbwiki' AS dbname FROM ckbwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cnwikimedia' AS dbname FROM cnwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cowiki' AS dbname FROM cowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cowikimedia' AS dbname FROM cowikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cowiktionary' AS dbname FROM cowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'crhwiki' AS dbname FROM crhwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'crwiki' AS dbname FROM crwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'csbwiki' AS dbname FROM csbwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'csbwiktionary' AS dbname FROM csbwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cswikibooks' AS dbname FROM cswikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cswikinews' AS dbname FROM cswikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cswikiquote' AS dbname FROM cswikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cswikisource' AS dbname FROM cswikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cswikiversity' AS dbname FROM cswikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cswiktionary' AS dbname FROM cswiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cuwiki' AS dbname FROM cuwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cvwiki' AS dbname FROM cvwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cvwikibooks' AS dbname FROM cvwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cywiki' AS dbname FROM cywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cywikibooks' AS dbname FROM cywikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cywikiquote' AS dbname FROM cywikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cywikisource' AS dbname FROM cywikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'cywiktionary' AS dbname FROM cywiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dawiki' AS dbname FROM dawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dawikibooks' AS dbname FROM dawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dawikiquote' AS dbname FROM dawikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dawikisource' AS dbname FROM dawikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dawiktionary' AS dbname FROM dawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dewikibooks' AS dbname FROM dewikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dewikinews' AS dbname FROM dewikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dewikiquote' AS dbname FROM dewikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dewikisource' AS dbname FROM dewikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dewikiversity' AS dbname FROM dewikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dewikivoyage' AS dbname FROM dewikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dewiktionary' AS dbname FROM dewiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dinwiki' AS dbname FROM dinwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'diqwiki' AS dbname FROM diqwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dkwikimedia' AS dbname FROM dkwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'donatewiki' AS dbname FROM donatewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dsbwiki' AS dbname FROM dsbwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dtywiki' AS dbname FROM dtywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dvwiki' AS dbname FROM dvwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dvwiktionary' AS dbname FROM dvwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'dzwiki' AS dbname FROM dzwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eewiki' AS dbname FROM eewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'elwiki' AS dbname FROM elwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'elwikibooks' AS dbname FROM elwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'elwikinews' AS dbname FROM elwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'elwikiquote' AS dbname FROM elwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'elwikisource' AS dbname FROM elwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'elwikiversity' AS dbname FROM elwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'elwikivoyage' AS dbname FROM elwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'elwiktionary' AS dbname FROM elwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'emlwiki' AS dbname FROM emlwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'enwikibooks' AS dbname FROM enwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'enwikinews' AS dbname FROM enwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'enwikisource' AS dbname FROM enwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'enwikiversity' AS dbname FROM enwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'enwikivoyage' AS dbname FROM enwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eowikibooks' AS dbname FROM eowikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eowikinews' AS dbname FROM eowikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eowikiquote' AS dbname FROM eowikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eowikisource' AS dbname FROM eowikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eowiktionary' AS dbname FROM eowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eswikibooks' AS dbname FROM eswikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eswikinews' AS dbname FROM eswikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eswikiquote' AS dbname FROM eswikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eswikisource' AS dbname FROM eswikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eswikiversity' AS dbname FROM eswikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eswikivoyage' AS dbname FROM eswikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'eswiktionary' AS dbname FROM eswiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'etwiki' AS dbname FROM etwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'etwikibooks' AS dbname FROM etwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'etwikimedia' AS dbname FROM etwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'etwikiquote' AS dbname FROM etwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'etwikisource' AS dbname FROM etwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'etwiktionary' AS dbname FROM etwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'euwiki' AS dbname FROM euwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'euwikibooks' AS dbname FROM euwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'euwikiquote' AS dbname FROM euwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'euwikisource' AS dbname FROM euwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'euwiktionary' AS dbname FROM euwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'extwiki' AS dbname FROM extwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fawikibooks' AS dbname FROM fawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fawikinews' AS dbname FROM fawikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fawikiquote' AS dbname FROM fawikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fawikisource' AS dbname FROM fawikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fawikivoyage' AS dbname FROM fawikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fawiktionary' AS dbname FROM fawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ffwiki' AS dbname FROM ffwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fiu_vrowiki' AS dbname FROM fiu_vrowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fiwikibooks' AS dbname FROM fiwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fiwikimedia' AS dbname FROM fiwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fiwikinews' AS dbname FROM fiwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fiwikiquote' AS dbname FROM fiwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fiwikisource' AS dbname FROM fiwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fiwikiversity' AS dbname FROM fiwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fiwikivoyage' AS dbname FROM fiwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fiwiktionary' AS dbname FROM fiwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fjwiki' AS dbname FROM fjwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fjwiktionary' AS dbname FROM fjwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'foundationwiki' AS dbname FROM foundationwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fowiki' AS dbname FROM fowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fowikisource' AS dbname FROM fowikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fowiktionary' AS dbname FROM fowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'frpwiki' AS dbname FROM frpwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'frrwiki' AS dbname FROM frrwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'frwikibooks' AS dbname FROM frwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'frwikinews' AS dbname FROM frwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'frwikiquote' AS dbname FROM frwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'frwikisource' AS dbname FROM frwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'frwikiversity' AS dbname FROM frwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'frwikivoyage' AS dbname FROM frwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'furwiki' AS dbname FROM furwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fywiki' AS dbname FROM fywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fywikibooks' AS dbname FROM fywikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'fywiktionary' AS dbname FROM fywiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gagwiki' AS dbname FROM gagwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ganwiki' AS dbname FROM ganwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gawiki' AS dbname FROM gawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gawiktionary' AS dbname FROM gawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gdwiki' AS dbname FROM gdwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gdwiktionary' AS dbname FROM gdwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'glkwiki' AS dbname FROM glkwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'glwiki' AS dbname FROM glwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'glwikibooks' AS dbname FROM glwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'glwikiquote' AS dbname FROM glwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'glwikisource' AS dbname FROM glwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'glwiktionary' AS dbname FROM glwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gnwiki' AS dbname FROM gnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gnwiktionary' AS dbname FROM gnwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gomwiki' AS dbname FROM gomwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gorwiki' AS dbname FROM gorwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gotwiki' AS dbname FROM gotwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'guwiki' AS dbname FROM guwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'guwikiquote' AS dbname FROM guwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'guwikisource' AS dbname FROM guwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'guwiktionary' AS dbname FROM guwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gvwiki' AS dbname FROM gvwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'gvwiktionary' AS dbname FROM gvwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hakwiki' AS dbname FROM hakwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hawiki' AS dbname FROM hawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hawiktionary' AS dbname FROM hawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hawwiki' AS dbname FROM hawwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hewikibooks' AS dbname FROM hewikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hewikinews' AS dbname FROM hewikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hewikiquote' AS dbname FROM hewikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hewikisource' AS dbname FROM hewikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hewikivoyage' AS dbname FROM hewikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hewiktionary' AS dbname FROM hewiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hifwiki' AS dbname FROM hifwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hifwiktionary' AS dbname FROM hifwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hiwiki' AS dbname FROM hiwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hiwikibooks' AS dbname FROM hiwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hiwikimedia' AS dbname FROM hiwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hiwikiquote' AS dbname FROM hiwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hiwikiversity' AS dbname FROM hiwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hiwikivoyage' AS dbname FROM hiwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hiwiktionary' AS dbname FROM hiwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hrwiki' AS dbname FROM hrwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hrwikibooks' AS dbname FROM hrwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hrwikiquote' AS dbname FROM hrwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hrwikisource' AS dbname FROM hrwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hrwiktionary' AS dbname FROM hrwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hsbwiki' AS dbname FROM hsbwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hsbwiktionary' AS dbname FROM hsbwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'htwiki' AS dbname FROM htwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'huwikibooks' AS dbname FROM huwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'huwikiquote' AS dbname FROM huwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'huwikisource' AS dbname FROM huwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'huwiktionary' AS dbname FROM huwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hywiki' AS dbname FROM hywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hywikibooks' AS dbname FROM hywikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hywikiquote' AS dbname FROM hywikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hywikisource' AS dbname FROM hywikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'hywiktionary' AS dbname FROM hywiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iawiki' AS dbname FROM iawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iawikibooks' AS dbname FROM iawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iawiktionary' AS dbname FROM iawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'idwikibooks' AS dbname FROM idwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'idwikiquote' AS dbname FROM idwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'idwikisource' AS dbname FROM idwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'idwiktionary' AS dbname FROM idwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iewiki' AS dbname FROM iewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iewiktionary' AS dbname FROM iewiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'igwiki' AS dbname FROM igwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ikwiki' AS dbname FROM ikwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ilowiki' AS dbname FROM ilowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'incubatorwiki' AS dbname FROM incubatorwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'inhwiki' AS dbname FROM inhwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iowiki' AS dbname FROM iowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iowiktionary' AS dbname FROM iowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iswiki' AS dbname FROM iswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iswikibooks' AS dbname FROM iswikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iswikiquote' AS dbname FROM iswikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iswikisource' AS dbname FROM iswikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iswiktionary' AS dbname FROM iswiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'itwikibooks' AS dbname FROM itwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'itwikinews' AS dbname FROM itwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'itwikiquote' AS dbname FROM itwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'itwikisource' AS dbname FROM itwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'itwikiversity' AS dbname FROM itwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'itwikivoyage' AS dbname FROM itwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'itwiktionary' AS dbname FROM itwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iuwiki' AS dbname FROM iuwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'iuwiktionary' AS dbname FROM iuwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jamwiki' AS dbname FROM jamwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jawikibooks' AS dbname FROM jawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jawikinews' AS dbname FROM jawikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jawikiquote' AS dbname FROM jawikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jawikisource' AS dbname FROM jawikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jawikiversity' AS dbname FROM jawikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jawiktionary' AS dbname FROM jawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jbowiki' AS dbname FROM jbowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jbowiktionary' AS dbname FROM jbowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jvwiki' AS dbname FROM jvwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'jvwiktionary' AS dbname FROM jvwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kaawiki' AS dbname FROM kaawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kabwiki' AS dbname FROM kabwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kawiki' AS dbname FROM kawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kawikibooks' AS dbname FROM kawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kawikiquote' AS dbname FROM kawikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kawiktionary' AS dbname FROM kawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kbdwiki' AS dbname FROM kbdwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kbpwiki' AS dbname FROM kbpwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kgwiki' AS dbname FROM kgwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kiwiki' AS dbname FROM kiwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kkwiki' AS dbname FROM kkwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kkwikibooks' AS dbname FROM kkwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kkwiktionary' AS dbname FROM kkwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'klwiki' AS dbname FROM klwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'klwiktionary' AS dbname FROM klwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kmwiki' AS dbname FROM kmwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kmwikibooks' AS dbname FROM kmwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kmwiktionary' AS dbname FROM kmwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'knwiki' AS dbname FROM knwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'knwikiquote' AS dbname FROM knwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'knwikisource' AS dbname FROM knwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'knwiktionary' AS dbname FROM knwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'koiwiki' AS dbname FROM koiwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kowikibooks' AS dbname FROM kowikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kowikinews' AS dbname FROM kowikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kowikiquote' AS dbname FROM kowikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kowikisource' AS dbname FROM kowikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kowikiversity' AS dbname FROM kowikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kowiktionary' AS dbname FROM kowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'krcwiki' AS dbname FROM krcwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kshwiki' AS dbname FROM kshwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kswiki' AS dbname FROM kswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kswiktionary' AS dbname FROM kswiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kuwiki' AS dbname FROM kuwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kuwikibooks' AS dbname FROM kuwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kuwikiquote' AS dbname FROM kuwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kuwiktionary' AS dbname FROM kuwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kvwiki' AS dbname FROM kvwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kwwiki' AS dbname FROM kwwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kwwiktionary' AS dbname FROM kwwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kywiki' AS dbname FROM kywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kywikibooks' AS dbname FROM kywikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kywikiquote' AS dbname FROM kywikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'kywiktionary' AS dbname FROM kywiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ladwiki' AS dbname FROM ladwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lawiki' AS dbname FROM lawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lawikibooks' AS dbname FROM lawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lawikiquote' AS dbname FROM lawikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lawikisource' AS dbname FROM lawikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lawiktionary' AS dbname FROM lawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lbewiki' AS dbname FROM lbewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lbwiki' AS dbname FROM lbwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lbwiktionary' AS dbname FROM lbwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lezwiki' AS dbname FROM lezwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lfnwiki' AS dbname FROM lfnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lgwiki' AS dbname FROM lgwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lijwiki' AS dbname FROM lijwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'liwiki' AS dbname FROM liwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'liwikibooks' AS dbname FROM liwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'liwikiquote' AS dbname FROM liwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'liwikisource' AS dbname FROM liwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'liwiktionary' AS dbname FROM liwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lmowiki' AS dbname FROM lmowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lnwiki' AS dbname FROM lnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lnwiktionary' AS dbname FROM lnwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'loginwiki' AS dbname FROM loginwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lowiki' AS dbname FROM lowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lowiktionary' AS dbname FROM lowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lrcwiki' AS dbname FROM lrcwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ltgwiki' AS dbname FROM ltgwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ltwiki' AS dbname FROM ltwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ltwikibooks' AS dbname FROM ltwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ltwikiquote' AS dbname FROM ltwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ltwikisource' AS dbname FROM ltwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ltwiktionary' AS dbname FROM ltwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lvwiki' AS dbname FROM lvwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'lvwiktionary' AS dbname FROM lvwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'maiwiki' AS dbname FROM maiwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'maiwikimedia' AS dbname FROM maiwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'map_bmswiki' AS dbname FROM map_bmswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mdfwiki' AS dbname FROM mdfwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mediawikiwiki' AS dbname FROM mediawikiwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mgwiki' AS dbname FROM mgwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mgwikibooks' AS dbname FROM mgwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mgwiktionary' AS dbname FROM mgwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mhrwiki' AS dbname FROM mhrwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'minwiki' AS dbname FROM minwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'miwiki' AS dbname FROM miwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'miwiktionary' AS dbname FROM miwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mkwiki' AS dbname FROM mkwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mkwikibooks' AS dbname FROM mkwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mkwikimedia' AS dbname FROM mkwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mkwikisource' AS dbname FROM mkwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mkwiktionary' AS dbname FROM mkwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mlwiki' AS dbname FROM mlwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mlwikibooks' AS dbname FROM mlwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mlwikiquote' AS dbname FROM mlwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mlwikisource' AS dbname FROM mlwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mlwiktionary' AS dbname FROM mlwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mnwiki' AS dbname FROM mnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mnwiktionary' AS dbname FROM mnwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mrjwiki' AS dbname FROM mrjwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mrwiki' AS dbname FROM mrwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mrwikibooks' AS dbname FROM mrwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mrwikiquote' AS dbname FROM mrwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mrwikisource' AS dbname FROM mrwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mrwiktionary' AS dbname FROM mrwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mswiki' AS dbname FROM mswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mswikibooks' AS dbname FROM mswikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mswiktionary' AS dbname FROM mswiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mtwiki' AS dbname FROM mtwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mtwiktionary' AS dbname FROM mtwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mwlwiki' AS dbname FROM mwlwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mxwikimedia' AS dbname FROM mxwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'myvwiki' AS dbname FROM myvwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mywiki' AS dbname FROM mywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mywiktionary' AS dbname FROM mywiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'mznwiki' AS dbname FROM mznwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nahwiki' AS dbname FROM nahwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nahwiktionary' AS dbname FROM nahwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'napwiki' AS dbname FROM napwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nawiki' AS dbname FROM nawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nawiktionary' AS dbname FROM nawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ndswiki' AS dbname FROM ndswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ndswiktionary' AS dbname FROM ndswiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nds_nlwiki' AS dbname FROM nds_nlwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'newiki' AS dbname FROM newiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'newikibooks' AS dbname FROM newikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'newiktionary' AS dbname FROM newiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'newwiki' AS dbname FROM newwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nlwikibooks' AS dbname FROM nlwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nlwikimedia' AS dbname FROM nlwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nlwikinews' AS dbname FROM nlwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nlwikiquote' AS dbname FROM nlwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nlwikisource' AS dbname FROM nlwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nlwikivoyage' AS dbname FROM nlwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nlwiktionary' AS dbname FROM nlwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nnwiki' AS dbname FROM nnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nnwikiquote' AS dbname FROM nnwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nnwiktionary' AS dbname FROM nnwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nostalgiawiki' AS dbname FROM nostalgiawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'novwiki' AS dbname FROM novwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nowikibooks' AS dbname FROM nowikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nowikimedia' AS dbname FROM nowikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nowikinews' AS dbname FROM nowikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nowikiquote' AS dbname FROM nowikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nowikisource' AS dbname FROM nowikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nowiktionary' AS dbname FROM nowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nrmwiki' AS dbname FROM nrmwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nsowiki' AS dbname FROM nsowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nvwiki' AS dbname FROM nvwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nycwikimedia' AS dbname FROM nycwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'nywiki' AS dbname FROM nywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ocwiki' AS dbname FROM ocwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ocwikibooks' AS dbname FROM ocwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ocwiktionary' AS dbname FROM ocwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'olowiki' AS dbname FROM olowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'omwiki' AS dbname FROM omwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'omwiktionary' AS dbname FROM omwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'orwiki' AS dbname FROM orwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'orwikisource' AS dbname FROM orwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'orwiktionary' AS dbname FROM orwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'oswiki' AS dbname FROM oswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'outreachwiki' AS dbname FROM outreachwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pagwiki' AS dbname FROM pagwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pamwiki' AS dbname FROM pamwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'papwiki' AS dbname FROM papwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pawiki' AS dbname FROM pawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pawikibooks' AS dbname FROM pawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pawikisource' AS dbname FROM pawikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pawiktionary' AS dbname FROM pawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pcdwiki' AS dbname FROM pcdwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pdcwiki' AS dbname FROM pdcwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pflwiki' AS dbname FROM pflwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pihwiki' AS dbname FROM pihwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'piwiki' AS dbname FROM piwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'plwikibooks' AS dbname FROM plwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'plwikimedia' AS dbname FROM plwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'plwikinews' AS dbname FROM plwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'plwikiquote' AS dbname FROM plwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'plwikisource' AS dbname FROM plwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'plwikivoyage' AS dbname FROM plwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'plwiktionary' AS dbname FROM plwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pmswiki' AS dbname FROM pmswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pnbwiki' AS dbname FROM pnbwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pnbwiktionary' AS dbname FROM pnbwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pntwiki' AS dbname FROM pntwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pswiki' AS dbname FROM pswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'pswiktionary' AS dbname FROM pswiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ptwikibooks' AS dbname FROM ptwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ptwikimedia' AS dbname FROM ptwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ptwikinews' AS dbname FROM ptwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ptwikiquote' AS dbname FROM ptwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ptwikisource' AS dbname FROM ptwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ptwikiversity' AS dbname FROM ptwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ptwikivoyage' AS dbname FROM ptwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ptwiktionary' AS dbname FROM ptwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'quwiki' AS dbname FROM quwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'quwiktionary' AS dbname FROM quwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rmwiki' AS dbname FROM rmwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rmywiki' AS dbname FROM rmywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rnwiki' AS dbname FROM rnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'roa_rupwiki' AS dbname FROM roa_rupwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'roa_rupwiktionary' AS dbname FROM roa_rupwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'roa_tarawiki' AS dbname FROM roa_tarawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'romdwikimedia' AS dbname FROM romdwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rowikibooks' AS dbname FROM rowikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rowikinews' AS dbname FROM rowikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rowikiquote' AS dbname FROM rowikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rowikisource' AS dbname FROM rowikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rowikivoyage' AS dbname FROM rowikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rowiktionary' AS dbname FROM rowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rswikimedia' AS dbname FROM rswikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ruewiki' AS dbname FROM ruewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ruwikibooks' AS dbname FROM ruwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ruwikimedia' AS dbname FROM ruwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ruwikinews' AS dbname FROM ruwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ruwikiquote' AS dbname FROM ruwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ruwikisource' AS dbname FROM ruwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ruwikiversity' AS dbname FROM ruwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ruwikivoyage' AS dbname FROM ruwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ruwiktionary' AS dbname FROM ruwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rwwiki' AS dbname FROM rwwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'rwwiktionary' AS dbname FROM rwwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sahwiki' AS dbname FROM sahwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sahwikisource' AS dbname FROM sahwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sawiki' AS dbname FROM sawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sawikibooks' AS dbname FROM sawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sawikiquote' AS dbname FROM sawikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sawikisource' AS dbname FROM sawikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sawiktionary' AS dbname FROM sawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'scnwiki' AS dbname FROM scnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'scnwiktionary' AS dbname FROM scnwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'scowiki' AS dbname FROM scowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'scwiki' AS dbname FROM scwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sdwiki' AS dbname FROM sdwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sdwiktionary' AS dbname FROM sdwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sewiki' AS dbname FROM sewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sewikimedia' AS dbname FROM sewikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sgwiki' AS dbname FROM sgwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sgwiktionary' AS dbname FROM sgwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'shwiki' AS dbname FROM shwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'shwiktionary' AS dbname FROM shwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'simplewiki' AS dbname FROM simplewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'simplewiktionary' AS dbname FROM simplewiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'siwiki' AS dbname FROM siwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'siwikibooks' AS dbname FROM siwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'siwiktionary' AS dbname FROM siwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'skwiki' AS dbname FROM skwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'skwikibooks' AS dbname FROM skwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'skwikiquote' AS dbname FROM skwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'skwikisource' AS dbname FROM skwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'skwiktionary' AS dbname FROM skwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'slwiki' AS dbname FROM slwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'slwikibooks' AS dbname FROM slwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'slwikiquote' AS dbname FROM slwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'slwikisource' AS dbname FROM slwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'slwikiversity' AS dbname FROM slwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'slwiktionary' AS dbname FROM slwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'smwiki' AS dbname FROM smwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'smwiktionary' AS dbname FROM smwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'snwiki' AS dbname FROM snwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sourceswiki' AS dbname FROM sourceswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sowiki' AS dbname FROM sowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sowiktionary' AS dbname FROM sowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'specieswiki' AS dbname FROM specieswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sqwiki' AS dbname FROM sqwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sqwikibooks' AS dbname FROM sqwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sqwikinews' AS dbname FROM sqwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sqwikiquote' AS dbname FROM sqwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sqwiktionary' AS dbname FROM sqwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'srnwiki' AS dbname FROM srnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'srwiki' AS dbname FROM srwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'srwikibooks' AS dbname FROM srwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'srwikinews' AS dbname FROM srwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'srwikiquote' AS dbname FROM srwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'srwikisource' AS dbname FROM srwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'srwiktionary' AS dbname FROM srwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sswiki' AS dbname FROM sswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'sswiktionary' AS dbname FROM sswiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'stqwiki' AS dbname FROM stqwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'stwiki' AS dbname FROM stwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'stwiktionary' AS dbname FROM stwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'suwiki' AS dbname FROM suwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'suwikiquote' AS dbname FROM suwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'suwiktionary' AS dbname FROM suwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'svwikibooks' AS dbname FROM svwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'svwikinews' AS dbname FROM svwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'svwikiquote' AS dbname FROM svwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'svwikisource' AS dbname FROM svwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'svwikiversity' AS dbname FROM svwikiversity_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'svwikivoyage' AS dbname FROM svwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'svwiktionary' AS dbname FROM svwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'swwiki' AS dbname FROM swwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'swwiktionary' AS dbname FROM swwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'szlwiki' AS dbname FROM szlwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tawiki' AS dbname FROM tawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tawikibooks' AS dbname FROM tawikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tawikinews' AS dbname FROM tawikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tawikiquote' AS dbname FROM tawikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tawikisource' AS dbname FROM tawikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tawiktionary' AS dbname FROM tawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tcywiki' AS dbname FROM tcywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'test2wiki' AS dbname FROM test2wiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'testwiki' AS dbname FROM testwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'testwikidatawiki' AS dbname FROM testwikidatawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tetwiki' AS dbname FROM tetwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tewiki' AS dbname FROM tewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tewikibooks' AS dbname FROM tewikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tewikiquote' AS dbname FROM tewikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tewikisource' AS dbname FROM tewikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tewiktionary' AS dbname FROM tewiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tgwiki' AS dbname FROM tgwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tgwikibooks' AS dbname FROM tgwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tgwiktionary' AS dbname FROM tgwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'thwikibooks' AS dbname FROM thwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'thwikiquote' AS dbname FROM thwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'thwikisource' AS dbname FROM thwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'thwiktionary' AS dbname FROM thwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tiwiki' AS dbname FROM tiwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tiwiktionary' AS dbname FROM tiwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tkwiki' AS dbname FROM tkwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tkwiktionary' AS dbname FROM tkwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tlwiki' AS dbname FROM tlwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tlwikibooks' AS dbname FROM tlwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tlwiktionary' AS dbname FROM tlwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tnwiki' AS dbname FROM tnwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tnwiktionary' AS dbname FROM tnwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'towiki' AS dbname FROM towiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tpiwiki' AS dbname FROM tpiwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tpiwiktionary' AS dbname FROM tpiwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'trwikibooks' AS dbname FROM trwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'trwikimedia' AS dbname FROM trwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'trwikinews' AS dbname FROM trwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'trwikiquote' AS dbname FROM trwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'trwikisource' AS dbname FROM trwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'trwiktionary' AS dbname FROM trwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tswiki' AS dbname FROM tswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tswiktionary' AS dbname FROM tswiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ttwiki' AS dbname FROM ttwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ttwikibooks' AS dbname FROM ttwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ttwiktionary' AS dbname FROM ttwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tumwiki' AS dbname FROM tumwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'twwiki' AS dbname FROM twwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tyvwiki' AS dbname FROM tyvwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'tywiki' AS dbname FROM tywiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'uawikimedia' AS dbname FROM uawikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'udmwiki' AS dbname FROM udmwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ugwiki' AS dbname FROM ugwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ugwiktionary' AS dbname FROM ugwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ukwikibooks' AS dbname FROM ukwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ukwikinews' AS dbname FROM ukwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ukwikiquote' AS dbname FROM ukwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ukwikisource' AS dbname FROM ukwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ukwikivoyage' AS dbname FROM ukwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'ukwiktionary' AS dbname FROM ukwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'urwiki' AS dbname FROM urwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'urwikibooks' AS dbname FROM urwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'urwikiquote' AS dbname FROM urwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'urwiktionary' AS dbname FROM urwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'uzwiki' AS dbname FROM uzwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'uzwikiquote' AS dbname FROM uzwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'uzwiktionary' AS dbname FROM uzwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'vecwiki' AS dbname FROM vecwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'vecwikisource' AS dbname FROM vecwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'vecwiktionary' AS dbname FROM vecwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'vepwiki' AS dbname FROM vepwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'vewiki' AS dbname FROM vewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'viwikibooks' AS dbname FROM viwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'viwikiquote' AS dbname FROM viwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'viwikisource' AS dbname FROM viwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'viwikivoyage' AS dbname FROM viwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'viwiktionary' AS dbname FROM viwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'vlswiki' AS dbname FROM vlswiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'votewiki' AS dbname FROM votewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'vowiki' AS dbname FROM vowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'vowiktionary' AS dbname FROM vowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'warwiki' AS dbname FROM warwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'wawiki' AS dbname FROM wawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'wawiktionary' AS dbname FROM wawiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'wbwikimedia' AS dbname FROM wbwikimedia_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'wikimania2018wiki' AS dbname FROM wikimania2018wiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'wowiki' AS dbname FROM wowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'wowikiquote' AS dbname FROM wowikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'wowiktionary' AS dbname FROM wowiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'wuuwiki' AS dbname FROM wuuwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'xalwiki' AS dbname FROM xalwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'xhwiki' AS dbname FROM xhwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'xmfwiki' AS dbname FROM xmfwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'yiwiki' AS dbname FROM yiwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'yiwikisource' AS dbname FROM yiwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'yiwiktionary' AS dbname FROM yiwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'yowiki' AS dbname FROM yowiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zawiki' AS dbname FROM zawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zeawiki' AS dbname FROM zeawiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zhwikibooks' AS dbname FROM zhwikibooks_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zhwikinews' AS dbname FROM zhwikinews_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zhwikiquote' AS dbname FROM zhwikiquote_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zhwikisource' AS dbname FROM zhwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zhwikivoyage' AS dbname FROM zhwikivoyage_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zhwiktionary' AS dbname FROM zhwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zh_classicalwiki' AS dbname FROM zh_classicalwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zh_min_nanwiki' AS dbname FROM zh_min_nanwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zh_min_nanwikisource' AS dbname FROM zh_min_nanwikisource_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zh_min_nanwiktionary' AS dbname FROM zh_min_nanwiktionary_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zh_yuewiki' AS dbname FROM zh_yuewiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zuwiki' AS dbname FROM zuwiki_p.revision_userindex WHERE rev_user_text = :user UNION ALL SELECT COUNT(rev_id) AS counter, 'zuwiktionary' AS dbname FROM zuwiktionary_p.revision_userindex WHERE rev_user_text = :user
+93.52s: Quering wikis on `s7.labsdb` for matching revisions
+0s: [SQL] SELECT ...
+1.97s: Quering wikis on `s2.labsdb` for matching revisions
+0s: [SQL] SELECT ...
+2.78s: Quering wikis on `s4.labsdb` for matching revisions
+0s: [SQL] SELECT COUNT(rev_id) AS ...
+1.18s: Quering wikis on `s5.labsdb` for matching revisions
+0s: [SQL] SELECT COUNT(rev_id) AS ...
+0.18s: Quering wikis on `s1.labsdb` for matching revisions
+0s: [SQL] SELECT COUNT(rev_id) AS ...
+0.47s: Quering wikis on `s6.labsdb` for matching revisions
+0s: [SQL] SELECT COUNT(rev_id) AS ...
+0.48s: Quering wikis on `s8.labsdb` for matching revisions
+0s: [SQL] SELECT COUNT(rev_id) AS ...
+0.23s: Query user data for ab.wikipedia.org
+0.03s: Query contributions on ab.wikipedia.org

I've copied it to https://quarry.wmflabs.org/query/27221 for convenience. This query used to take a less than a second usually (with the occasional exception at 2-3 seconds), but now 80-150s.

Jeff_G added a subscriber: Jeff_G.May 28 2018, 1:19 PM

I just did the same query and got "+110.24s: Quering wikis on s7.labsdb for matching revisions" out of "Total: 157.62s." with "Current time: Mon, 28 May 2018 13:14:28 +0000".

I executed that query and got 719 rows in set (2 min 10.78 sec).

SHOW EXPLAIN FOR refuse to say how the query is executed:

MariaDB [abwiki_p]> SHOW EXPLAIN FOR 26169917;
ERROR 1933 (HY000): Target is not running an EXPLAINable command

And SHOW PROCESSLIST says the status is Opening tables

MariaDB [abwiki_p]> SHOW PROCESSLIST;
+----------+-------+-------------------+----------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+
| Id       | User  | Host              | db       | Command | Time | State          | Info                                                                                                 | Progress |
+----------+-------+-------------------+----------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+
| 26169917 | u3306 | 10.64.37.14:50928 | abwiki_p | Query   |   67 | Opening tables | SELECT COUNT(rev_id) AS counter, 'abwiki' AS dbname FROM abwiki_p.revision_userindex WHERE rev_user_ |    0.000 |
| 26169991 | u3306 | 10.64.37.14:51194 | abwiki_p | Query   |    0 | init           | SHOW PROCESSLIST                                                                                     |    0.000 |
+----------+-------+-------------------+----------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+
2 rows in set (0.00 sec)

To be clear, by "same query", I meant https://tools.wmflabs.org/guc/?user=Krinkle&debug=true, currently "+38.09s: Quering wikis on s7.labsdb for matching revisions" out of "Total: 91.17s." with "Current time: Thu, 31 May 2018 04:00:09 +0000".

Bstorm added a comment.Jun 4 2018, 5:14 PM

I checked through and verified that the indexing and such (as well as individual EXPLAINs) on one of the servers are consistent for s7 dbs. Being stuck on "opening tables" seems like a locking/caching issue rather than a typical "too many joins" issue. The table_open_cache is at 5000, which isn't bad. I would also consider that unlikely to only happen on s7, though (and abwiki is s3 anyway).

The idea that it is only on s7 queries is sort of stumping me right now. All shards have the MCR changes, and those dbs aren't very huge. Is this analytics or web? I'm guessing analytics, which tells me which other server to check.

Krinkle added a comment.EditedJun 5 2018, 5:28 PM

@Bstorm It's all on web. In particular, s1.web. These are user-facing queries that typically took <2s prior to last month (with some outliers to 7-10s), and now taking several minutes.

This includes the queries for s3/s7 wiki dbs. In the past, GUC optimised connection re-use by slice (so never more than 8 connections, but usually less given most users haven't logged-in to wikis on all slices - this is checked beforehand via CentralAuth).

A few months back it was recommended to me to not even re-use by slice, but re-use the same connection for all, building on the assumption that currently all dbs are hosted on all slaves. As a compromise between clean code (not assuming s1 hosts s3 dbs) and optimal connection re-use, I decided to refactor the connection re-use code to key by IP address (instead of hostname). This means that as long as s3.web/s7.web etc. resolve to the same IP as the initial connection for s1.web, GUC will use the same connection for all queries.

Ok, from that perspective, I suspect very strongly that the problem is the changes to the views. The various slices do run on the same set of replica servers. For web, it's a single server with failover, served via a proxy. As a result, you should pretty much always have the same IP (the db proxy). My tests showed the indexes were used at least, but beyond the fact that joins are added to the views, load will have increased as a result of them as well.

I'm still thinking about this, in terms of good solutions. For page queries, we ended up removing one of the joins (revision, since that was the problematic table due to its size). I don't have a clear smoking gun for this one yet.

Krinkle added a comment.EditedJun 24 2018, 3:36 AM

Is there something I can do in the meantime to improve this particular query? It doesn't have to be pretty :)

I believe GUC is one of the most popular tools for content reviewers and vandalism correction. With GUC taking several minutes to respond, the workflow has been severely disrupted.

For most Wikipedias, edit review relies on a fairly small group of people doing a lot of work, which already doesn't scale well, but gets much worse when a reviewing a single user or IP in GUC takes 3 minutes.

Bstorm added a subscriber: jcrespo.EditedJun 27 2018, 6:49 PM

@jcrespo or @Marostegui I was going through this again today, and I noticed that the primary replica server for the web has an awful lot of this "opening tables" going on--even from 'system user' processes. I also noticed this is not happening on the analytics servers.

It seems like there is something here I am missing, and possibly something up on the server.

Vvjjkkii renamed this task from GUC query performance regressed 100x from <3s to 80-300s to cccaaaaaaa.Jul 1 2018, 1:08 AM
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
NicoScribe renamed this task from cccaaaaaaa to GUC query performance regressed 100x from <3s to 80-300s.Jul 1 2018, 12:28 PM
NicoScribe updated the task description. (Show Details)
NicoScribe added subscribers: Aklapper, gerritbot.
Samtar added a subscriber: Samtar.Jul 1 2018, 1:59 PM

This problem also appears to be affecting StalkToy and CrossActivity at https://tools.wmflabs.org/meta/stalktoy/ and https://tools.wmflabs.org/meta/crossactivity/ .

Jeff_G added a comment.Jul 2 2018, 1:26 AM

For page queries, we ended up removing one of the joins (revision, since that was the problematic table due to its size).

Can you try putting it back as a test? How big was it?

Bstorm added a comment.Jul 2 2018, 5:43 PM

Oh no, all this times up the other way around, and the page join removal would have put things back to the way they were before you started to see problems, and the addition of the joins are likely to still be a problem. If I put the joins back, it would crush performance for basically anything querying the page table. I'm quite sure that has no effect here. The MCR revisions (which added lots more joins, including to the revision table), however, introduced many joins to the tables you are querying. Removing those joins might fix things, but they will also break backward compatibility with MCR. I am concerned about the overall health of the database system on that server, though because of how much I see things in an "opening tables" state. That seems weird. It could be connected to the MCR changes, or it might be something else.

@Anomie @daniel I don't think your suggestions to create views to maintain backwards compatibility are the right way to go- instead, they are degrading performance, in some cases leading to high load on the servers that cannot be handled. I think the right way to go is to announce MCR to wikirreplica users, and explain why backwards compatibility cannot be done- and expose the real tables. This will certainly break many tools- but not worse than making all not work anymore due to performance issues. Unlike API calls, one cannot guarantee a stable interface for the internal tables- and we should reward those that keep them up to date, not the other way.

Fine by me. When I made the suggestion, it was only a suggestion pending it being feasible and desired.

The table_open_cache is at 5000, which isn't bad.

The current revision_userindex view expands to 7 tables, and the query quoted as being slow in T195515#4234202 selects that view on 719 wikis, which would be a total of 5033 tables.

it was only a suggestion pending it being feasible and desired

Note it was not my intention to blame you- I also agreed to do this, but seen the several issues (this is just one of them), I think we should draft a warning and communicate the changes on cloud-l.

@jcrespo I'm fine with not having all these joins. I'd suggest to hide the fields that will become unreliable instead, and do it soon. It will probably break some things, put probably not much, since there arn't terribly many use cases on labs for these fields anyway:

page.page_content_model
revision.rev_content_model
revision.rev_content_format
revision.rev_text_id

I will change T174047 to call for these fields to be hidden, instead of compatibility to be maintained for them.

Note that other fields in the revision table will become unused as well, due to the Comment and Actor migrations. @Anomie will know how to best handle those.

There are two types of joins going on for the actor and comment table stuff:

  • Forward-compat joins to emulate rev_actor and rev_comment_id, which will be the eventual schema once we can alter revision.
  • Back-compat joins to continue showing values in rev_user, rev_user_text, and rev_comment once the migrations happen.

I don't have an opinion on whether or not to keep the back-compat indexes.

Yes, removing them will break a lot of tools. I'm not sure we need to decide on that right now.

However, I do agree that we absolutely must provide simple and performant views as an option, so that tools that are willing to take the responsibility have the option to write tools that do complex queries and are still usable in real-time. As far as I understand it, I currently don't have the option even.

Thank you all for looking into this - just noting that we rely heavily on GUC for steward activities, so this does currently impact our ability to deal with problems quickly

scwiki should now have more performant views. If all is well with it by tomorrow, I'll start deploying changes I mentioned here T174047 to the rest of the replicas. This should make compatibility joins in the views an "opt in" thing if you need them vs refactoring the tool.

Krinkle added a comment.EditedSep 12 2018, 4:42 AM

@Bstorm Thanks. I won't mind if this breaks GUC. If that happens I'll quickly switch to _compat and then start work on using the new schemas directly.

If I understand correctly, it means that as of tomorrow, the wiki replicas available to Toolforge will be "fast by default", with the requirement to update queries if a field they use is renamed or moved in the real databases of WMF production. For tools unable to make adjustments quickly, you will also offer a _compat version of the tables which will remain exactly as the tables are today. The compat-made is what we did by default so far, and this is undesirable because it means tools are slow by default, and have no way to get faster data access. Is that right?

Also, if I understand correctly, at this time, only the following fields are different between the "compat" and "fast" views. If a tool does not use the below fields, then they do not have to make any change, and do not have to switch to "compat", and will automatically become faster tomorrow:

page.page_content_model

revision.rev_text_id
revision.rev_content_model
revision.rev_content_format

archive.ar_text_id
archive.ar_content_model
archive.ar_content_format

Can you confirm that I got all the affected fields?

Bstorm added a comment.EditedSep 12 2018, 11:52 AM

You've got the right idea (and that's all affected by this patch...though the changes that really affect those are not really in play yet--see below).

I'm not likely to get this out to everything in one day, but the nice thing is that the serious breaking stuff that needs the compat isn't coming for a while to my knowledge. That will be announced with more detail soon. I've been trying to get ahead of production schema changes with the views by adding all those joins and things before. Since that caused problems, we're changing direction so that there will be some _compat tables available, but things will be fast by default. If you follow changes in production, you should be fine in general anyway.

If my current merge breaks things, it's more that you should probably yell at me and let me know (so I can fix whatever I've made a mistake in). From what I know of the current state of the schema, my changes should not be breaking at this time.

I'm hoping this fixes some things when fully released, because some tables where I've added joins cannot be stripped of them. The relationships involved kind of dictate the data scrubbing and so forth.

This problem also appears to be affecting StalkToy and CrossActivity at https://tools.wmflabs.org/meta/stalktoy/ and https://tools.wmflabs.org/meta/crossactivity/ .

At least it's somewhat faster for IPs now; for instance, https://tools.wmflabs.org/meta/stalktoy/91.161.156.163 was processed in about 15s, https://tools.wmflabs.org/guc/?user=91.161.156.163&blocks=true&debug=true was processed in "Total: 22.4s.
Current time: Thu, 13 Sep 2018 09:56:31 +0000", and https://tools.wmflabs.org/meta/crossactivity/91.161.156.163 was processed in about 30s; whereas https://tools.wmflabs.org/meta/crossactivity/Shapito was processed in about 34s, https://tools.wmflabs.org/guc/?user=Shapito&debug=true was processed in "Total: 53.63s.
Current time: Thu, 13 Sep 2018 10:03:50 +0000", https://tools.wmflabs.org/meta/stalktoy/Krinkle was processed in about 100s, https://tools.wmflabs.org/guc/?user=Krinkle&debug=true was processed in "Total: 125.62s.
Current time: Thu, 13 Sep 2018 10:11:45 +0000", https://tools.wmflabs.org/meta/crossactivity/Krinkle was processed in about 179s, and https://tools.wmflabs.org/meta/stalktoy/Shapito was processed in about 200s.

It's more generally applied to the web replicas now. There is still one analytics replica I need to apply this change to, but that is promising.

I am going to look at applying the same logic in one more place, in case that's doable.

Reading back, revision_userindex does still have two joins in it. It joins on revision_comment_temp and comment. I'm going to see if the comment joins can be feasibly removed from at least the *_userindex tables.

Bstorm added a comment.Oct 1 2018, 2:48 PM

I have a patch up for review (which is waiting behind another one that remains to be deployed) that removes some things around the comment join. However, there I'm not sure I should remove the ones around revision_comment_temp. https://gerrit.wikimedia.org/r/c/operations/puppet/+/463541

This is deployed now. From my tests, things look much better.

Bstorm claimed this task.Oct 18 2018, 4:47 PM
Bstorm moved this task from Inbox to Doing on the cloud-services-team (Kanban) board.
Krinkle added a comment.EditedOct 19 2018, 4:46 AM

My last three (distinct) GUC queries came back in 62s, 24s, and 31s. That's 3 times better than 100-300 seconds. But, it's also still 10 times slower than the previous of 2-3 seconds. I'm not sure what we can do, but I believe this a big deal.

On the scale of an one reviewer analysing a suspect user, I believe it is acceptable to delay user response from nearly real-time to a few minutes later. Some users would disagree, but for myself I think the response doesn't need to be immediate (and arguably, sometimes, shouldn't be).

Rather, the reason I think the delay is a problem is because humans don't scale well at multi-tasking. Edit review for wikis often depend on a very small number of reviewers patrolling hundreds of edits each, in a given hour. That doesn't work well when a GUC query takes more than a handful of seconds.

Some nlwiki query results: Top 30 of patrol actions by hour by user in the last week is evenly distributed between 90 and 200 per hour for some users. That's higher than I thought (given state of GUC), but lower than it was on the months before May 2018 (400-1100 in some hours there), and October 2017 (100-350 in some hours). Note, this isn't meant as conclusive evidence that we've reduced quantitative productivity or anything. But, it does show that 1) some of our reviewers do a lot of work, and 2) they can't be using GUC for most edit now (given they're reviewing more edits than GUC can offer information for in the time spent).

This leads me to believe they're doing what I would've done: Continue patrolling as before, but without checking GUC, except when it's "really important". This is presumably leading to reduced ability to discover and combat cross-wiki vandalism.

The access logs from the GUC side somewhat corroborate this, but again, not conclusive. It received 900-1000 post requests per day Jan-April, and only ~450-600 per day June-Oct. Form views from ~5000/day down to ~3500/day. (Source: https://plot.ly/~Krinkle/136/, and gist).

@Bstorm I was going to suggest that my next step be that I switch GUC to use the regular database views (instead of the "compat" views), that would make it much faster.

But, then I remembered that GUC is already using the regular views. I forgot that we made compat opt-in. This is good, but now I'm wondering why we still have compatibility joins on the regular, "fast", database views. Should we remove the remaining compatibility from these views as well?

@Krinkle, the plan is definitely to remove all of those joins. At this point there are a few still there for forward compatibility. The ones for the comment table around images are going away soon, but I'm not sure exactly when the revision table joins will go away. The new fields are being kind of patched in via temp tables until the schema changes on big wikis are unblocked, and in the views, that is being abstracted in joins so that people can get ahead of schema changes. If someone wants to refactor their code when the new fields are getting written to, it will work as though it would in the final end state because of those joins, basically. Once the temp tables are gone, those joins aren't needed to simulate the future state of the tables.

So at very least, those temp table joins are not meant to last. The main reasoning for them being there is that they enable updates to tools vs punishing them with weird stuff like temporary tables. I, personally, kind of worry about them becoming bigger performance problems as they get bigger. I mean more raw views could be put up to accommodate situations where the forward compatibility joins are an issue as well.

There are a couple tables where joins are a part of the privacy scrubbing (actor and comment), and those cannot be helped as long as we use views to add to the scrubbing process, but in this case, I think revision is the table that is causing the problems.

Want to try a "_raw" version of the revision to table to speed up at least the initial GUC query? I think that without the forward compatibility joins, we'll have issues with volunteers updating code to match Mediawiki schema changes, but I'm really trying to find ways to make this not suck while all this goes on. 😅

(while this is in reply to @Bstorm's comment, the replies are written to @Krinkle)

At this point there are a few still there for forward compatibility. The ones for the comment table around images are going away soon, but I'm not sure exactly when the revision table joins will go away.

For the image comments, the task tracking that for the Cloud replicas is T189158: Change `image` view to properly expose the new `img_description_id` field. Round 1 is unblocked now, then I can run a maintenance script, and then round 2 will be unblocked.

For the revision table comments and actors, the plan as I understand it is something like this:

  1. Get T188327: Deploy refactored actor storage and T166733: Deploy refactored comment storage done and get T184615: Once MCR is deployed, drop the rev_text_id, rev_content_model, and rev_content_format fields from the revision table unblocked.
  2. Work with the DBAs to perform the alter on the revision table, dropping the now-unused columns and adding the new rev_actor and rev_comment_id columns. And update tables.sql, of course.
  3. Make code/config changes to write both the temp tables and new rev_actor and rev_comment_id fields.
  4. Run a maintenance script to populate the new fields from the temp tables.
  5. Update code/config and the Cloud views to read the new fields instead of the temp tables.
  6. Update code/config to stop writing the temp tables.
  7. Work with the DBAs to drop the temp tables, and update table.sql to match and clean up any leftover migration code.

Step #2 is, in large part, why we started the actor and comment project. Getting rid of the large rev_comment and rev_user_text columns is hoped to make alters of revision feasible. There's no timeframe for any of this, but anyone is free to make their own guesses as to how long each step will take.

but in this case, I think revision is the table that is causing the problems.

My guess, based on T195515#4391282 saying that it was blocked in an "opening tables" state, is that simply planning a query that tries to union together 719 queries with multiple tables each is what's making it so slow. I also find that trying to do a SHOW EXPLAIN claims "Target is not running an EXPLAINable command", which could be consistent with the slowness being at the planning stage rather than the execution.

I note that in the eventual future you'll have to switch to using the rev_actor column instead of rev_user_text, which would mean you'd have to look up the actor_id from the actor table either beforehand or with a join. And the actor view unavoidably has a lot of subqueries referencing other tables due to the requirement that we don't expose rows where all references have been deleted or hidden.

APerson added a subscriber: APerson.Nov 9 2018, 8:36 PM

Change 518335 merged by jenkins-bot:
[labs/tools/guc@master] Remove the display of total edit count
https://gerrit.wikimedia.org/r/518335

Change 518339 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[labs/tools/guc@master] Main: Micro-optimise CentralAuth query (avoid wildward select)

https://gerrit.wikimedia.org/r/518339

Change 518339 merged by jenkins-bot:
[labs/tools/guc@master] Main: Micro-optimise CentralAuth query (avoid wildward select)

https://gerrit.wikimedia.org/r/518339

Change 518343 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[labs/tools/guc@master] Replace for-each-wiki user.id query with CentralAuth query

https://gerrit.wikimedia.org/r/518343

Change 518343 merged by jenkins-bot:
[labs/tools/guc@master] Replace for-each-wiki user.id query with CentralAuth query

https://gerrit.wikimedia.org/r/518343

Change 518345 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[labs/tools/guc@master] Experiment with multipler smaller instead of one big query

https://gerrit.wikimedia.org/r/518345

Krinkle claimed this task.Jun 22 2019, 2:07 PM

Change 518377 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[labs/tools/guc@master] Main: Use a CentralAuth to reduce the list of wikis to check

https://gerrit.wikimedia.org/r/518377

Change 518377 merged by jenkins-bot:
[labs/tools/guc@master] Main: Use a CentralAuth to reduce the list of wikis to check

https://gerrit.wikimedia.org/r/518377

Change 518385 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[labs/tools/guc@master] Experiment with extra post-CentralAuth filter by editcount

https://gerrit.wikimedia.org/r/518385

Change 518345 abandoned by Krinkle:
Experiment with multipler smaller instead of one big query

Reason:
Made it slower, not faster. Going into this table on s3 would:

  • ~ 80s once (750 wikis),
  • ~ 40s three times (batches of 250 wikis),
  • ~ 30s eight times (batches of 100 wikis)

https://gerrit.wikimedia.org/r/518345

Change 518385 merged by jenkins-bot:
[labs/tools/guc@master] Experiment with extra post-CentralAuth filter by editcount

https://gerrit.wikimedia.org/r/518385

Change 518386 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[labs/tools/guc@master] Remove unused 'rev_parent_id' field from local queries

https://gerrit.wikimedia.org/r/518386

Change 518386 merged by jenkins-bot:
[labs/tools/guc@master] Remove unused 'rev_parent_id' field from local queries

https://gerrit.wikimedia.org/r/518386

Krinkle removed Krinkle as the assignee of this task.Jun 24 2019, 12:44 AM
bd808 closed this task as Resolved.Sep 11 2019, 3:46 PM
bd808 assigned this task to Krinkle.
bd808 added a subscriber: bd808.

Boldly resolving. If I missed something that was promised here @Krinkle maybe we should fork out new tasks to track that?