简体   繁体   中英

To many queries called per request in drupal

I've built an website using drupal and deployed it. But it very very slow. I installed the Devel module and see 120 queries per request. And the total execution time is 3000ms. Is this normal?

I just install some module such as: taxonomy menu, simple ads, classified ads, rule, locale. Can anyone suggest how to reduce this?

First try to debug the website as an anonymous user or any logged in user other than the admin to get more accurate stats.

Then you can consider caching the output to reduce the number of database queries. (faster approaches: cache some blocks in your page using views caching or block cache module ).

Hope this helps.

Make sure you have enabled caching option available in 'admin/config/development/performance' page, aggregating css and javascript could help a lot.

You can also enable views caching in those block in which you think data is not going to change frequently.

For images you can use image cache to reduce size of image from their original size, it could reduce you page size.

For more info you can visit " Drupal caching, speed and performance " page on drupal.org.

here the link of html output of my modules and my home page , which include devel information. Can you see some thing make my site slow.Maybe I left some module which need to be uninstalled. I see more than 300 query, and I don't think a website with 300 queries per request is normal. Thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM