Page 1 of 1

Query explosion... 66 queries for one page?

Posted: Thu Aug 31, 2006 1:02 pm
by sds
How on God's green earth can one page suck up 66 queries???  What happens when you actually get traffic to your website?  That seems uber-excessive to me considering a message board like IPB can do everything in only 8-10 queries.

http://www.sabresreport.com/cms/

look at at the source on the bottom, not what I have displayed in the footer.

Here is another:

http://www.sabresreport.com/cms/index.p ... nd_chamber

67 queries...  ???

Re: Query explosion... 66 queries for one page?

Posted: Thu Aug 31, 2006 2:33 pm
by calguy1000
It'd be helpful to actually provide the necessary information with your problem or question.  We can't even begin to think about an answer unless we have more information.

Which version of CMS
Which modules you're using
How many different {cms_module module=...} tags you have in your page and template
etc, etc, etc.

Re: Query explosion... 66 queries for one page?

Posted: Thu Aug 31, 2006 2:47 pm
by sds
wrt the second link:

default CMS Made Simple version 1.0-beta5 installation.  Just made one page and filled in the content.  Just changes some colors on the style sheet.  That's it.  One barebones page on a default install has 67 queries.  That's just nuts, IMHO.

Re: Query explosion... 66 queries for one page?

Posted: Thu Aug 31, 2006 2:54 pm
by calguy1000
On the 1.0-svn intranet site I'm building on my page..... I've got 34 queries....

that includes calls to {cms_module module=FrontEndUsers} {cms_module module=Calendar} {cms_module module=News} {cms_module module=rss} {cms_module module=Search} {cms_module module=menumanager}

I also have breadcrumbs on the page and a few others.

I think you're doing something that's a little wonky.
'

Re: Query explosion... 66 queries for one page?

Posted: Thu Aug 31, 2006 2:59 pm
by calguy1000
sorry, you are correct.... the query number is rather large, but the ram usage is lower, and the time is quite acceptable to me.  so I'm not too worried about it.

Code: Select all

<!-- Generated in 0.196584 seconds by CMS Made Simple using 21 SQL queries -->
<!-- CMS Made Simple - Released under the GPL - http://cmsmadesimple.org -->

Static content pages Re: Query explosion... 66 queries for one page?

Posted: Thu Aug 31, 2006 8:10 pm
by Pierre M.
On my almost out of the box install, most pages use only 8 queries, the one with news 13. Seems ok.

But well, I care about that. It is ok for a low traffic site. It could be a problem for a famous one.

For high traffic sites I (re)suggest that the pages should not be rendered on the fly but once at modify time and then statically served : every time you modify a page, it is rendered (even if it take 500 queries and 50 seconds) and written to disk (/pretty/url/path/hierarchy/page.html). And this static html file can be served easily more than 1 million times a day without any SQL query and even no PHP CPU time.

And the site can be mirrored easily. And pretty urls give pretty accessloging. And security is better (no PHP to break). And random/magic images/banners are still dynamic (src="/cgimage/?id=xyz"). And... where is the problem ?-)

PM