commons-app / commonsmisc

4 stars 5 forks source link

Optimise query for getting deleted uploads #9

Closed maskaravivek closed 5 years ago

maskaravivek commented 5 years ago

I ran SQL optimizer for the query to get deleted uploads and it suggested me to use filearchive_userindex table instead.

https://tools.wmflabs.org/sql-optimizer?use=commonswiki_p&sql=select+count%28*%29+from+filearchive+where+fa_user_text%3D%22Maskaravivek%22

Using the _userindex table seems to return the response much quicker. :)

https://quarry.wmflabs.org/query/31719

urbanecm commented 5 years ago

Looks to be done, https://github.com/urbanecm/commonsmisc/blob/master/feedback.py#L62.