It seems to me Drupal makes many calls to the DB engine.

For example it seems the updating of the watchdog table is done executing one query for each line to be updated or added and this generates many queries.

Many ISP provide a limit to this number of queries and, in my case, it's very easy to achieve this limit (3.000 queries per hour), also if the site is very little and for the moment I'm quite the only user...

For example only for installing the .po file for the italian translation, I had to split it in four files and import them one by one after waiting one hour between each other.

I'm thinking to change ISP, but I'm also asking the reason of that and if it is possible to do something the solve this problem.

Many thanks,
Michele

Comments

vm’s picture

Drupal is database driven and does indeed use the DB to its fullest. I suggest a VPS or a dedicated server for Drupal use, especially where you are serving dynamic content. Use aggressive caching where you can, The developers are continuing to work on caching mechanisms, there are already a few available in the downloads area.

investigate blockcache.module for one, to reduce the amount of querries blocks use, investigate advcache, and possible memcache.modules

Users who are logged in use the most querries from what I can see, installing the devel.module will help you track where your querries are being used and from there, you can decide to shut off certain modules if they are being too resocue intensive for your restictive host.

nancydru’s picture

I've heard of all kinds of restrictions from hosting companies, but the number of queries per hour is a new one. I would switch hosts in a heart beat for that.

Drupal 6 will reduce the number of queries, but Drupal is always going to be database-centric (probably all content management systems will be). Just to give you an idea, on a site with less than a dozen menu entries and only two blocks on the home page, it executes 86 queries just to get the home page up. Most of that was for the menu and the two blocks. My most complex site (which is not very complex compared to many others) requires 179 queries to display the home page. So a limit of 3,000 per hour is going to be eaten up very quickly.

Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database