Many many repeating querries.
| Project: | Drigg |
| Version: | 5.x-1.36 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
I have installed devel.module because I was not happy with site speed.
I was stunned to see how many querries I get on homepage. 1000+ queries!!!
I tried to disable all blocks, locale.module, pathauto and I cut it to 600 (with 18 items on frontpage).
Even going to 6 items I am getting 250+ queries.
I can see that there are many repeating queries for each teaser - such as:
taxonomy_node_get_terms 6!
user_load 50!
profile_load_profile 26! (why this? anyway)
votingapi_get_voting_result 6!
I am not a programmer, but why each teaser is loaded separatelly instead of one querry that will spit-out all results?
I will also need to investigate (probably ask some php friends) why do I have queries from other modules such as og_user without using a bit of these modules on homepage. (I know this is not issue of Drigg code).
Can somebody give me easy explanation, why is this done this way?
I am just comparing this to my other site where I use vbulletin with "milions" of informations on frontpage and 30 queries total... not to mention the light-speed comparing to Drupal (plus my Drupal site is almost empty).
Sorry if I sound complaining :)

#1
Did you or could you try using the block cache module and report to say if the number of queries has decrease significantly?
Perhaps those blocks create most of the queries, don't they?
#2
Hi,
About these queries:
user_load 50!
profile_load_profile 26! (why this? anyway)
This is a problem with Drupal: it really ,really, REALLY should cache user_load calls, and it doesn't.
Drigg is also a bit of a bugger: the default aliases take 1 query each, and so do the taxonomy terms displayed.
However... these queries are _really_ fast.
Now... I am gonna mark this as "won't fix", but only because Drigg is being ported to Drupal 6, and things should improve _dramatically_ after that. So, let's see.
In the meantime, I can tell you, and I will shout while saying this: YOU NEED MYSQL'S QUERY CACHE To BE QUITE BIG.
Seriously!
Alright, I am gonna be quiet now :-D
Merc,
#3
Hi Merc.
do you mean this by mysql query cache? http://dev.mysql.com/doc/refman/5.0/en/query-cache.html
#4
Hi,
Yep!
Merc.
#5
Well I have this ON on my server, but the site is slow because of many queries anyway...
#6
Hi,m
Upgrading to D6 will help you a lot.
Final testing is happening right now.
*I* need to upgrade fsdaily.com to D6 anyway... so we are all in a hurry.
Merc.