By andre75 on
Yesterday I let the devel module loose on my site and clicked around a bit. Most forum nodes were way beyond 200 queries per page.
I realized that all the links (add comment ...) cause an individual query.
Is there no way to make the Drupal a little less mysql intensive?
I was shocked when I thought about scalability.
Andre
http://www.opentravelinfo.com
http://www.aguntherphotography.com
Comments
would enabling cache lower
would enabling cache lower the amount of querries? or does drupal not cache the querries?
caching
Well, if you have the page cache enabled, only a single query should be needed per page.
I think there is some serious concern about improving performance. In regards to the forum module particularly, there was some development towards additional caching for the blocks and other elements:
http://drupal.org/node/72617
http://drupal.org/node/80951
---
Work: BioRAFT
Well, if you have the page
That only works for anonymous users though right? If you've got busy forums with logged in users accessing the pages, then page caching doesn't help at all unless I've misunderstood. In terms of scalability, that's the way a lot of forums will go.
Thanks for the pointer to
Thanks for the pointer to block caching - already a module!
http://drupal.org/project/blockcache
Just enabled it and it's cutting down a lot of queries per page, thanks!
Oh cool
Yes, for anonymous users there shouldn't be a big problem. I have to be logged in to see the output of the devel module, unless I want everyone to see all the queries (not a good idea). I didn't know about the blockcache project.
I am going to check it out.
Thanks for the pointer.
Andre
-------------------------------------------------
http://www.opentravelinfo.com
http://www.aguntherphotography.com
Not much better
Well that really didn't do much. I enabled it for most blocks.
This forum node:
http://www.opentravelinfo.com/node/743
has the topic + 20 replies and comes in at 360 queries on first load and 347 queries on second load (I guess the blockcache saved 13).
Thats still far beyond what one would expect.
Andre
-------------------------------------------------
http://www.opentravelinfo.com
http://www.aguntherphotography.com
flatcomments
To get around the "all add comments cause individual query" issue, you could try Heine's flat comments module.
http://drupal.org/project/flatcomments
it makes all comments replies to the original node instead of threaded, not sure if it actually reduces database queries but might be worth a go.