hello all,
I am running coppermine 1.22b on a nuke 7.6 patched 3.4. On my host logs it shows that this querry in cpg is slow.
Code:
SELECT COUNT(*) FROM cpg_comments as c INNER JOIN cpg_pictures AS p ON (p.pid = c.pid AND approved='YES') INNER JOIN cpg_albums as a ON (p.aid = a.aid AND visibility IN (0,2,2,24545) AND category >= '0') ORDER BY msg_date DESC
Can anyone tell me how to speed it up on php and mysql 5.X
I'm not a huge SQL guru, so this may be off. But it seems as if you're selecting a count(*) and yet doing ORDER BY also. If your return is nothing but a single integer (and that's what you want) you could drop the sort to pick up a good bit of speed.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum