Drupal Excessive SQL Queries...

Events happening in the community are now at Drupal community events on www.drupal.org.
u007's picture

On my site, i've installed several modules which leads to about:
+ 250+ queries on admin page
+ 160+ queries on every other page accessed , including frontpage.

I'm amazed by the number of queries it used up...
Thats why the site seems to be quite slow...
Anyone have any suggestion?
I know i need to trim down on my modules, but i think some of the large number of queries are from drupal core itself...

Comments

160 doesn't sound like very

dalin's picture

160 doesn't sound like very many to me. But there may be a few really bad ones. I would enable the devel module and see if there are any queries taking much longer than the others. Also the total time spent on queries is also an important stat.

--


Dave Hansen-Lange
Director of Technical Strategy, Advomatic.com
Pronouns: he/him/his

A decent place to start on

andrew_rs's picture

A decent place to start on the subject of drupal performance are the following presentations given at Drupalcon DCFront End Performance – Make Your Website Lightning Fast and Backend Drupal Performance Optimization and Tuning: a guide for everyone | DrupalCon DC. A video download is also available (the mysql part is about 45 minutes in).

Please try this

rahul.anand77's picture

Hi,
what you can do is just make a string like $str and append you queries into this string and then finally you will get a string with all the queries and run it. It will implement all the queries in one wtrike.

$str="INSERT INTO student(name,rollno) VALUES(";

$str.="'test','101'),";
$str.="'test1','102')";
db_query($str);

it will insert two records in one strike.

Ragards
Rahul Anand

Denmark

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week