Ilmari Karonen wrote:
While tweaking my MIMEStatBot[1] to handle random Query Killer attacks better, I got to thinking...
Would it be practical to set up a local index on the toolserver for (img_major_mime, img_minor_mime, img_media_type) on the image table for commonswiki (and maybe others too)?
Such an index would hopefully cut the runtime of my weekly queries from hours to seconds or less. It might also enable other tools to make better use of the MIME type info stored in the database.
Of course, populating and maintaining such an index would consume some time and storage space. But I wonder if it might not be worth the tradeoff. What do the TS admins think?
Your bot doesn't need to do a full query on the mime fields. You could just keep track of uploads and deletions, and update the counters accordingly.