LJackson
08-15-2011, 11:24 PM
Hi All
this query
SELECT cdID, cdName, cdThumbIMG, cdThumbHeight, cdThumbWidth, cdRRP, cdBinding
FROM tbl_cds
WHERE cdBinding = '$cSect' && cdReleaseDate <= now()
ORDER BY cdReleaseDate DESC
LIMIT 3
takes approx 3.343secs to execute, thats not to bad i hear you say but this query is inside a loop and is ran 3 times on my page for 3 different cSects so thats 10 secs in total just for this query alone :(
now the table has 73000 rows in it and its the order by which is causing the slowness without that line it takes approx 0.0754secs to execute, big difference, if i can speed up this query at all, would lead to massive improvments on my pages load speed
many thanks
Luke
this query
SELECT cdID, cdName, cdThumbIMG, cdThumbHeight, cdThumbWidth, cdRRP, cdBinding
FROM tbl_cds
WHERE cdBinding = '$cSect' && cdReleaseDate <= now()
ORDER BY cdReleaseDate DESC
LIMIT 3
takes approx 3.343secs to execute, thats not to bad i hear you say but this query is inside a loop and is ran 3 times on my page for 3 different cSects so thats 10 secs in total just for this query alone :(
now the table has 73000 rows in it and its the order by which is causing the slowness without that line it takes approx 0.0754secs to execute, big difference, if i can speed up this query at all, would lead to massive improvments on my pages load speed
many thanks
Luke