Page 3 of 4

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 6:25 pm
by JeremyBASS
ok so counted them up... there are 45 of them installed... i don't use more then 5-10 per page... i need them all in there...

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 6:35 pm
by Sonya
45?  :o
I think, too much. CMSMS loads all modules with every page whether the module is used on the page or not <- I believe this will be corrected in CMSMS 2.0.

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 6:41 pm
by calguy1000
CMS Loads all modules, but doesn't execute anything for modules that aren't called in one way or another (event handlers, etc, etc)...

On the template being displayed, and the debug output, I see that FEU and CustomContent are being used, News, Search, menu manager of course, etc, etc, etc.  they're all being used on that page.

There are some repeated queries there, to test if the user is logged in, and the session hasn't expired, etc.  Most of them are probably necessary, to see if the page or templates can be retrieved from cache, to get content so that you can extract next/prev links, parents, etc, etc.

I would double check that there aren't bugs, that you can't create indexes to speed some things up, and that the mysql query cache is tuned properly.

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 6:43 pm
by JeremyBASS
CMSMS loads all modules with every page  :o
oh dear... will would you know if the planed fix for this in in the SVN?  I only use up to 10 per page but i use them all... so I'd think i'd need to fix this lol... damn i can't belive they all load... that sucks... the first time i'm sad with CMSMS lol

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 6:47 pm
by calguy1000
CMS loads the php files and instantiates the class for every page load.... that's it.  No actions are called (actions are the things that usually do the sql queries etc), unless a module is called in a GCB, page template, or content block, or that module is listed as a handler for some frontend events.

It needs to be there, and is not a bug... it's because some modules (like CustomContent, CGSimpleSmarty) don't have actions, they just do smarty stuff.

Other modules may be installed and may listen to certain frontend events, etc.... that's why they're all loaded (unless they're marked as inactive).

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 6:54 pm
by JeremyBASS
@Calguy
that you can't create indexes to speed some things up,
no sure what you mean... have a link handy or can you explain?
and that the mysql query cache is tuned properly.
no sure what you mean... i truned the catche on the page on... have a link handy or can you explain?
CMS loads the php files and instantiates the class for every page load.... that's it.  No actions are called (actions are the things that usually do the sql queries etc), unless a module is called in a GCB, page template, or content block, or that module is listed as a handler for some frontend events.

It needs to be there, and is not a bug... it's because some modules (like CustomContent, CGSimpleSmarty) don't have actions, they just do smarty stuff.

Other modules may be installed and may listen to certain frontend events, etc.... that's why they're all loaded (unless they're marked as inactive).
rock on... so um... i don't know where to go from here lol...

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 7:16 pm
by Sonya
calguy1000 wrote: CMS loads the php files and instantiates the class for every page load.... that's it.  No actions are called (actions are the things that usually do the sql queries etc), unless a module is called in a GCB, page template, or content block, or that module is listed as a handler for some frontend events.
calguy100, is this a performance issue or not? There is a Tuning HowTo written by cyberman http://forum.cmsmadesimple.org/index.ph ... 474.0.html in German and I have understood from it that one can speed up the site performance by uninstalling unused modules.  ???

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 7:26 pm
by calguy1000
if you have modules that you don't use, or don't use regularly uninstall them.

by uninstalling modules you're reducing the need to even process those files, and lowering your php memory requirements.

De-activating modules can have a similar effect.

Some of the modules you can de-activate/de-install till you need them again are:
  ModuleManager
  ThemeManager
  NuSoap
  SitePusher

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 7:36 pm
by JeremyBASS
Some of the modules you can de-activate/de-install till you need them again are:
  ModuleManager
  ThemeManager
  NuSoap
  SitePusher
will do ... is there a full list of ones that are not needed to run?  I have 45 installed and i use almost all of them a some point in the site...

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 7:36 pm
by Sonya
calguy1000 wrote: if you have modules that you don't use, or don't use regularly uninstall them.

by uninstalling modules you're reducing the need to even process those files, and lowering your php memory requirements.

De-activating modules can have a similar effect.

Some of the modules you can de-activate/de-install till you need them again are:
  ModuleManager
  ThemeManager
  NuSoap
  SitePusher
Thank you, cyberman wrote that modules has to be unstalled AND removed. For me, great news that it is not so, because I need some development modules only if I debug and develop the project but I now do need to remove them.

Jeremy, forget all I said, I'm a woman :)

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 7:43 pm
by JeremyBASS
Jeremy, forget all I said, I'm a woman
And beautiful one at that.. but no need to try to discredit your self... your iUSER mod is very promising, after this and another problem I was going to get back on that... but you are helping.... and i thank you for that :)

Re: Too many SQL queries, why?

Posted: Tue May 13, 2008 8:14 pm
by JeremyBASS
@Calguy  so i tryed what you suggested... Looks like i shaved .4 sec... not a big gain but a gain... so... what else could be done...?

Re: Too many SQL queries, why?

Posted: Wed May 14, 2008 3:06 pm
by Pierre M.
JeremyBASS wrote:
and that the mysql query cache is tuned properly.
no sure what you mean... i truned the catche on the page on... have a link handy or can you explain?
Calguy was suggesting to double check the database engine. Its cache, not CMSms' cache. May be you rely on an overloaded SQL server or some bad setting in it.

Pierre M.

Re: Too many SQL queries, why?

Posted: Wed May 14, 2008 3:12 pm
by JeremyBASS
Got you... any one know how to do that if that site is hosted on Godaddy? :)

Re: Too many SQL queries, why?

Posted: Wed May 14, 2008 3:35 pm
by Pierre M.
JeremyBASS wrote: any one know how to do that if that site is hosted on Godaddy? :)
This is not CMSms specific. This is a question for the G... support. BTW, google nodaddy

Pierre M.