[SLOW_QUERIES] Query of 50000 lines

Author Message

Sébastien Morel

Friday 03 February 2006 2:43:32 am

Hello everybody,

I have a big problem with a site (arround 40 000objects).

In fact, sometime, ezpublish generate big query. The result of this big query is that the server down.

I'm looking for the reasons of this request but I don't find the source of this problem.

Here, an extract of the slow queries

# Query_time: 113  Lock_time: 1  Rows_sent: 19532  Rows_examined: 78128
SELECT ezcontentobject_attribute.*, ezcontentclass_attribute.identifier as identifier FROM
                    ezcontentobject_attribute, ezcontentclass_attribute
                  WHERE
                    ezcontentclass_attribute.version = '0' AND
                    ezcontentclass_attribute.id = ezcontentobject_attribute.contentclassattribute_id AND
                    ( ( ezcontentobject_attribute.version = '7' AND
                    ezcontentobject_attribute.contentobject_id = '15249' AND
                    ezcontentobject_attribute.language_code = 'fre-FR' )  OR ( ezcontentobject_attribute.version = '1' AND
....
50000 lins after
...
ezcontentobject_attribute.language_code = 'fre-FR' )  OR ( ezcontentobject_attribute.version = '1' AND
                    ezcontentobject_attribute.contentobject_id = '45527' AND
                    ezcontentobject_attribute.language_code = 'fre-FR' )  OR ( ezcontentobject_attribute.version = '1' AND
                    ezcontentobject_attribute.contentobject_id = '45642' AND
                    ezcontentobject_attribute.language_code = 'fre-FR' )  )
                  ORDER BY
                    ezcontentobject_attribute.contentobject_id, ezcontentclass_attribute.placement ASC;

I must say you that these objects are stocked in the same parent node.
And, I tried, to find the bug, doing a fetch(all) on this node but the fetch don't create a such query.
So, I don't understand where this big query is created.

Thank you for your help

Sébastien

--
eZ c'est plus fort que toi !
http://www.ez-france.org
http://blog.plopix.net
@Novactive (http://www.novactive.com)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 03:35:15
Script start
Timing: Jan 31 2025 03:35:15
Module start 'layout'
Timing: Jan 31 2025 03:35:15
Module start 'content'
Timing: Jan 31 2025 03:35:16
Module end 'content'
Timing: Jan 31 2025 03:35:16
Script end

Main resources:

Total runtime1.0316 sec
Peak memory usage8,192.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.1328151.2109
Module start 'layout' 0.00470.0041 739.3438220.6875
Module start 'content' 0.00871.0220 960.03134,381.1875
Module end 'content' 1.03080.0008 5,341.21887.8438
Script end 1.0316  5,349.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3287160.0002
Check MTime0.00130.1216160.0001
Mysql Total
Database connection0.00070.071410.0007
Mysqli_queries0.951892.2634460.0207
Looping result0.00040.0384440.0000
Template Total0.978594.820.4892
Template load0.00240.233020.0012
Template processing0.976094.613220.4880
Template load and register function0.00180.169910.0018
states
state_id_array0.00140.137910.0014
state_identifier_array0.00080.078820.0004
Override
Cache load0.00190.1822150.0001
Sytem overhead
Fetch class attribute can translate value0.00170.168510.0017
Fetch class attribute name0.00200.193320.0010
XML
Image XML parsing0.00270.263810.0027
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00390.3773160.0002
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs