114 SQL queries
114 SQL queries
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.
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.
Re: 114 SQL queries
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?!?!?!?!?!
{* 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?!?!?!?!?!
Re: 114 SQL queries
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
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
Re: 114 SQL queries
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.
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.
Re: 114 SQL queries
Sometimes {cms_selflink} tags can make lot's sql queries. Check if reducing some of them is possible.
Re: 114 SQL queries
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!
I'll end up without a CMS at all!
Re: 114 SQL queries
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.
With 1.x, you can try the cache module or Apache's mod_cache.
Pierre M.
Re: 114 SQL queries
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
When is V2 expected to arrive?
Thanks.
Luca
Re: 114 SQL queries
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.
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.
Re: 114 SQL queries
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.
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.