114 SQL queries

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
sirluke
Forum Members
Forum Members
Posts: 15
Joined: Tue Jul 10, 2007 1:49 pm

114 SQL queries

Post by sirluke »

Hi guys,
I've got a speed problem due to an eccessive number of SQL queries. Most of them made by frontenduser and cms_content.
CMSMS version is 1.1.3.1.

You can take a look at:
www.alma-automotive.com/home

Here is the template:
------------------------------------------------------------------------------------------------------------------------
{cms_module module=CustomContent}







{sitename} - {title}


{metadata}


{cstylesheet}


{cms_selflink dir="start" rellink=1}
{cms_selflink dir="prev" rellink=1}
{cms_selflink dir="next" rellink=1}



{literal}

=b){nw=b+"px";}if(w



#pagewrapper {width:expression(P7_MinMaxW(720,950));}
#container {height: 1%;}


{/literal}









   
   
      {anchor anchor='menu_vert' title='Skip to navigation' accesskey='n' text='Skip to navigation'}
      {anchor anchor='main' title='Skip to content' accesskey='s' text='Skip to content'}
   
   


   
   


 
 
          {cms_selflink dir="start" text="$sitename"}
 
 
 



 


 
 

     
     

     
     
        Navigation
        {menu template='alma_simple' collapse='1'}

{menu template='alma_simple' start_element='6.1' show_root_siblings='1'}

     
     

 
 
 
          {search} 
 
   



{cms_module module=FrontEndUsers form=logout}

{cms_module module=FrontEndUsers form=login nocaptcha=1}



     
        News
          {news number='3' detailpage='News' dateformat="%b %d, %Y"}
     
     

     
     


     
     
        {print showbutton=true script=true}-->
        {title}
        {ccontent}


       


{anchor anchor='main' text='^ Top'}

       
            {cms_selflink dir="previous" label="Previous page: "}

            {cms_selflink dir="next"}
        -->
       


     
     
 


 
 


 
 
      {global_content name='footer'}
   
 





--------------------------------------------------------------------------------------
Thanks again for help.
sirluke
Forum Members
Forum Members
Posts: 15
Joined: Tue Jul 10, 2007 1:49 pm

Re: 114 SQL queries

Post by sirluke »

There is something very strange. Since the site is under construction I've made a simple start page (www.alma-automotive.com) that uses a plain template:




{* Change lang="en" to the language of your site *}



{sitename} - {title}
{* The sitename is changed in Site Admin/Global settings. {title} is the name of each page *}

{metadata}
{* Don't remove this! Metadata is entered in Site Admin/Global settings. *}

{stylesheet}
{* This is how all the stylesheets attached to this template are linked to *}





      {* Start Content *}
     
        {content}
     
      {* End Content *}



--------------------------------------------------

This  underconstruction page does NOT have any tag in it. Despite that, I see a lot of queries made by frontendusers, how can that be possible?!?!?!?!?!
Pierre M.

Re: 114 SQL queries

Post by Pierre M. »

Hello,

the "" syntax is deprecated.

Pierre M.
sirluke
Forum Members
Forum Members
Posts: 15
Joined: Tue Jul 10, 2007 1:49 pm

Re: 114 SQL queries

Post by sirluke »

I changed the custom content sintax, but the query count did not change.
It went down from 116 to 81 by disabling debug mode, but they're still too many, I think.
If there's any other idea on how to simplify, I'll appreciate that.
Thanks.

Luca
Pierre M.

Re: 114 SQL queries

Post by Pierre M. »

Hello again Luca,

try to uninstall all unused modules, plugins and translations.
try to make your templates simpler (less {tags}).
If you have some, review your UDTs and GCBs : may be they are sources of SQL queries.

Pierre M.
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm

Re: 114 SQL queries

Post by KO »

Sometimes {cms_selflink} tags can make lot's sql queries. Check if reducing some of them is possible.
sirluke
Forum Members
Forum Members
Posts: 15
Joined: Tue Jul 10, 2007 1:49 pm

Re: 114 SQL queries

Post by sirluke »

Ok, but what's the point of using a CMS if I have to disable all the cool CMS features to make in work, like disabling selflink, unistanlling modules, reducing customcontent.
I'll end up without a CMS at all!
Pierre M.

Re: 114 SQL queries

Post by Pierre M. »

2.0 is coming, with full page caching feature.
With 1.x, you can try the cache module or Apache's mod_cache.

Pierre M.
sirluke
Forum Members
Forum Members
Posts: 15
Joined: Tue Jul 10, 2007 1:49 pm

Re: 114 SQL queries

Post by sirluke »

I'm already using the cache module, You can see the ccontent and cstylesheet tags in the template.
When is V2 expected to arrive?
Thanks.

Luca
Pierre M.

Re: 114 SQL queries

Post by Pierre M. »

Hello again Luca,

if you are already using a caching technique, why are you worrying about the number of SQL queries ? A page can take 3 minutes to be rendered, no problem : the static result will be served at light speed.
May be you want to try another one : On-the-fly Content-Regeneration (around at half of the page).

According to the blog, 2.0 is expected in February. But it is CMSms, it is free (GPL) software, it is ready when it is ready.

Pierre M.
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm

Re: 114 SQL queries

Post by KO »

One system I was working had an old server that had serious performance problems. No caching and page could take from 2 sec to 9 sec to display. This was about 30-35 sql queries. Anything running in that server was slow not only cms. Now that server has been changed and about 60 sql queries is takin 0.2 sec no caching.

Maybe you should check your web host as if you want to use cms, you should be aware it requires more from server than static pages.
Post Reply

Return to “CMSMS Core”