By iandit on
I'm wondering what is the "standard" query amount per page on your drupal site ? Currently we are building a highly customized site with Drupal and it seems the quantity of queries it needs for the main pages are in the range of 400 to 1500 queries.
We are wondering how people handle that properly? We've used the block cache modules to reduce it but there still seems to be around 250 queries. That's from the 1500 we intially had. It seems lots of queries are associated to the taxonomy so lets share tips and tricks on that issue on how to reduce the amount of queries... :)
Thanks.
Comments
Did you also enable the core
Did you also enable the core caching feature? This should significantly reduce the number of queries.
--
Ramiro.org | Torlaune.de
To be more exact, it does
To be more exact, it does not reduce the number of queries per page generation, but it does reduce the number of pages that have to be generated, and as a result of that the number of queries.
yaph, are you using the path and/or pathauto modules? If yes, you may want to try this patch: http://drupal.org/node/10655. I've seen this reduce up to 100 queries per page load (with a pretty basic site).
What does that do?
I did enable the cache and the other compress option on the performance link in site configuration. But going through the patch you were mentioning, in what term would it help reduce the queries ?
Thanks.
The link to node 10655 is
The link to node 10655 is about table prefixes. In what way would that influence the number of queries??
Ludo
counting the queries
May I ask how you count the queries?
ore
The Devel module shows you
The Devel module shows you the queries being made and the time each one takes.
Ludo
Devel module + Access Rights
Just install and enable the devel module then use the access rights to see who can see the information. There is a huge difference of queries when you are admin and when you are a normal user.
Hopefully I'm able to diminish the qty of queries. What I'm also thinking is putting the "latest prmoted articles" of the front page into a block and use the block cache as that seems to reduce a very large quantity of queries. Anybody has other ideas or can comment on those ideas?
Thanks.
I don't know if this makes
I don't know if this makes sense to your particular situation, but instead of actually showing the "latest articles", "top articles", "related articles" etc. I would just offer a link to them in the block. If someone actually wants to see your latest articles, the link will lead him to a node where the block code is executed. That would at least reduce the query load to just one page / node. It may not be the best approach, I know. But at this moment, the server pressure is felt by all visitors. If you just offer links instead of the actual query results, the pressure would only be felt by those actually interested in the latest articles, top articles etc.
I experienced an increasing server load with a "Related items" block. With the amount of nodes growing, this block proportionally caused more server pressure. Getting rid of that block, and only offering it on a dedicated node, at least got rid of that pressure. I think it makes sense to ask yourself if your visitors actually need all the information you're offering them. As they say, "Less is more" :-)
Ludo
Block Cache
You might want to try the block cache in that case for your "Related items" block. It does reduce substantially the quantity of queries made. Like the "Tagadelic" block, by caching it, I was able to reduce the queries quantity by like 100.
My problem is that its coming from all those taxonomy request. So I'm wondering what are the possibilities to optimize those pages by minimizing the queries made. I'll probably use other server optimization as well but if I can reduce the source of the potential problem right now, I would live a happier future.
Maybe put all I can into block and use the block cache as it seems to really reduce the quantity of queries. I'm just wondering what other methods people uses to optimize their pages.
Peace.
Check out this patch if
Check out this patch if you're using a lot of URL aliases:
http://drupal.org/node/100301
Also, check out the Advanced
Also, check out the Advanced Cache module
http://drupal.org/project/advcache
http://tranceplanet.org/zoki
http://tranceplanet.org/zoki
currently I have 189 queries for that profile page.... I would like to reduce num of queries there, or page load time at least.... pls help.