AND aid IN query - help AND aid IN query - help
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

AND aid IN query - help

Started by copperminepro, February 25, 2008, 02:25:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

copperminepro

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?