forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: copperminepro on February 25, 2008, 02:25:05 am

Title: AND aid IN query - help
Post by: copperminepro on February 25, 2008, 02:25:05 am
I've been trying to track down this query from the slow log but sadly I have no idea where it is coming from.. It's the number 2 contender in my slow query log (next to getting users upload counts by cpmfetch  :-[)

Now, I know on the gallery index this query appears for picture counts on albums, which I really would like to keep intact.

The query appears like this:

SELECT * FROM cpg1411_pictures WHERE approved = 'YES' AND aid IN (2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29 ----------------------- ,549,550,551)

So it's checking something like 551 albums... Is this the query that checks the total number of pictures? It's frequently taking 2 seconds to execute.

Where can I find this query? What is this query doing?