php12345
php12345

Reputation: 143

Drupal high number of queries

I have Drupal site and it is very slow. It's on localhost and it takes 4-5 sec to load one page. I enabled general_log in mysql and i saw that for just one page drupal executes more than 2000 queries...

Is there way to speed up this ?

Upvotes: 1

Views: 134

Answers (2)

Steve
Steve

Reputation: 1423

Drupal can be a beast if not optimized for production: General guideline:

  • Disabled devel module
  • Disabled Views UI
  • Enabled any Views caching (views content cache)
  • Enable Page caching
  • Enable Block caching
  • Disable database logging (use syslog instead)
  • Disable the statistics module

Note: If your site makes use of authenticated traffic (logged in users to Drupal), this is a completely different paradigm in which most of the caching efforts above are ignored for logged in users.

Upvotes: 1

Graham
Graham

Reputation: 667

One way to improve that is to turn on all the different forms of caching. You may not see much of a difference when you are logged in, but guests can often see a substantial speedup. Also consolidating JS and CSS files helps a lot.

If you use the devel module, you can see all the queries and the time they take. It's very convenient.

Upvotes: 0

Related Questions