Forums / Setup & design / Too many MySQL queries

Too many MySQL queries

Author Message

Pascal France

Tuesday 16 October 2007 9:34:23 am

Hi,

I've a trouble with the speed of the admin interface.

The refresh time of my collapsed content tree take about 25s and 350 mysql queries.
And this time is at least the same each time I want to do something from the contextual menu.

After I read these posts:

http://ez.no/developer/forum/general/ez_publish_performance_optimisation_faq/(offset)/20
http://ez.no/developer/forum/developer/i_read_all_about_ez_performance_but_admin_part_is_slow

...the settings of my admin site.ini.append.php are:

[TemplateSettings]
TemplateCache=enabled
TemplateCompile=enabled
TemplateOptimization=enabled
Debug=disabled
ShowXHTMLCode=disabled
ShowUsedTemplates=disabled

[DebugSettings]
DebugOutput=enabled
DebugRedirection=disabled

[DatabaseSettings]
UsePersistentConnection=enabled

My content tree contains about 180 objects.

In the second post above, Łukasz Serwatka says
"content/view/full/2 in admin usually takes around 12 SQL queries on cached site" !

I run:

ez publish 3.9.3
apache 1.3.37
PHP 4.4.7
eaccelerator

On the public wed side, the Total script time is about 1.2 sec for each page

What more could I do thant I already done ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Tuesday 16 October 2007 9:46:22 am

On the same machine, I've installed a fresh ezp 3.9.3 with ezwebin.

By default, the Total script time of the content tree is about 2 sec and the MySQL queries count is 10

Where does come from such a difference ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Damien Pobel

Tuesday 16 October 2007 11:51:46 pm

Hi Pascal,

Did you check permissions on the var directory and its sub directories ?
Did you check the ViewCaching setting in site.ini and others cache related settings (*Cache) ?

By default, UsePersistentConnection is disabled, I don't if this settings has good (or bad) effects on performance.

Perhaps you can set DebugOuput to enabled and paste here the result ?

Damien
Planet eZ Publish.fr : http://www.planet-ezpublish.fr
Certification : http://auth.ez.no/certification/verify/372448
Publications about eZ Publish : http://pwet.fr/tags/keywords/weblog/ez_publish

André R.

Wednesday 17 October 2007 12:33:13 am

Please install ezjaxx extension or upgrade to 3.10/4.0 where you also have a dynamic content tree menu.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Pascal France

Wednesday 17 October 2007 2:56:46 am

Hi André,

Will this solve the problem of the long long time (30-40 sec) the system takes to edit or save an article (or any other object), even its content is short ?

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

André R.

Wednesday 17 October 2007 3:25:27 am

It should help quite a lot on this:

The refresh time of my collapsed content tree take about 25s and 350 mysql queries.

so when you browse around or when you hit 'publish' after editing some content.

Edit: Editing performance is also further increased in ezp4.0 thanks to php 5.2 and use of native xml in php 5 instead of ezxml.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

eZ debug

Timing: Jan 19 2025 09:00:55
Script start
Timing: Jan 19 2025 09:00:55
Module start 'content'
Timing: Jan 19 2025 09:00:55
Module end 'content'
Timing: Jan 19 2025 09:00:55
Script end

Main resources:

Total runtime0.1598 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0094 588.9453180.8438
Module start 'content' 0.00940.0087 769.7891101.9766
Module end 'content' 0.01810.1415 871.7656531.7500
Script end 0.1596  1,403.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00372.2972200.0002
Check MTime0.00150.9383200.0001
Mysql Total
Database connection0.00181.124910.0018
Mysqli_queries0.106166.42891410.0008
Looping result0.00130.83851390.0000
Template Total0.141188.310.1411
Template load0.00100.625910.0010
Template processing0.140187.675410.1401
Override
Cache load0.00070.448910.0007
Sytem overhead
Fetch class attribute can translate value0.00080.470710.0008
XML
Image XML parsing0.00040.227910.0004
General
dbfile0.00674.2107200.0003
String conversion0.00000.003930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs