Hi, have a website runs with gallery3 and it has 40000+ images. Today I just checked by MySQL slow query log and found out that there is a very slow query
# Query_time: 1.318432 Lock_time: 0.000092 Rows_sent: 42707 Rows_examined: 87568
use freewal3_begi;
SET timestamp=1346668464;
SELECT `items`.*
FROM `items`
WHERE (`items`.`view_1` = '1') AND `type` <> 'album'
ORDER BY `created` DESC
As you can see it has examined 87568 and returned all the content of items table, so I think the respose data size is very big too because it selects * from items.
I dont know which page has generated this query, but I think it is not essential to fetch the whole items table for one page view. Any Ideas to optimize this query?
Posts: 27300
Could be a module that is generating that. Hard to tell.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 29
floridave are you sure that the above query is not generated by gallery 3 core?
Posts: 27300
I don't know.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
Possibly the RSS module:
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 29
floridave you are right. I tried to access RSS feeds of my site and checked the slow query log and saw the same query again. But those pages only dispalys the latest galleries, comments etc only. fetching complete table is not necessary. Then why fetch them all?
Posts: 27300
I guess it has to look at all items even deeply nested albums to see if you added a new item?
I'm no SQL or RSS expert.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team