commons-app / commonsmisc

4 stars 5 forks source link

Merge article used and unique used query #5

Closed maskaravivek closed 2 years ago

maskaravivek commented 5 years ago

Fixes #4

Unable to test it. @urbanecm need your help in testing the same.

maskaravivek commented 5 years ago

So many lines are showing as changes because of formatting.

urbanecm commented 5 years ago

Looks it takes too long

` MariaDB [commonswiki_p]> select count(*) as articlesUsing, count(distinct gil_to) as uniqueUsed from globalimagelinks where gil_to in (select log_title from logging_userindex where log_type="upload" and log_user=(select user_id from user where user_name="Ainali")); +---------------+------------+ | articlesUsing | uniqueUsed | +---------------+------------+ | 556184 | 1132 | +---------------+------------+ 1 row in set (1 min 19.45 sec)

MariaDB [commonswiki_p]> `