database query slow on one of multiple sites

Author Message

Baur Aibek

Wednesday 14 July 2004 3:05:43 am

hi people

we have several sites, all are working fine, but one is too slow
we use postgres, our server is two processor with 1GB memory.

here is small example from postgres log:

problem site: query duration: 2361.473 ms
normal site: query duration: 10.899 ms

200 times longer!!!

query is one and the same in both cases:

SELECT ezcontentobject.*, ezcontentobject_tree.*, ezcontentclass.name as class_name
, ezcontentobject_name.name as name,  ezcontentobject_name.real_translation 
FROM ezcontentobject_tree, ezcontentobject, ezcontentclass , ezcontentobject_name 
WHERE node_id = 2 
AND ezcontentobject_tree.contentobject_id=ezcontentobject.id 
AND ezcontentclass.version=0  
AND ezcontentclass.id = ezcontentobject.contentclass_id
and  ezcontentobject_tree.contentobject_id = ezcontentobject_name.contentobject_id
and ezcontentobject_tree.contentobject_version = ezcontentobject_name.content_version
and ezcontentobject_name.content_translation = 'eng-GB'

and there are a lot of such long queries, imagine how much tame it takes to view such site!

we even have one query on a problem site that lasts 47 seconds.

Cud u please hint what is the reason?

for ur information : i don't remeber how the problem site was created. may be it was created by copying base from another site.
i think there is some links to another base that causing such delays

any ideas on how to investigate the trouble or to find a cure?

Baur Aibek

Wednesday 14 July 2004 10:14:37 pm

we solved a problem

solution: dump database, remove old base, restore from dump

but the question remains what had happend?

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 18 2025 19:12:24
Script start
Timing: Jan 18 2025 19:12:24
Module start 'layout'
Timing: Jan 18 2025 19:12:24
Module start 'content'
Timing: Jan 18 2025 19:12:25
Module end 'content'
Timing: Jan 18 2025 19:12:25
Script end

Main resources:

Total runtime0.6198 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.0391152.6406
Module start 'layout' 0.00650.0018 740.679739.4766
Module start 'content' 0.00830.6101 780.1563429.7109
Module end 'content' 0.61840.0014 1,209.86728.1250
Script end 0.6198  1,217.9922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5234160.0002
Check MTime0.00140.2237160.0001
Mysql Total
Database connection0.00180.293910.0018
Mysqli_queries0.574792.7153520.0111
Looping result0.00060.1026500.0000
Template Total0.592095.520.2960
Template load0.00200.322520.0010
Template processing0.590095.179420.2950
Template load and register function0.00020.025710.0002
states
state_id_array0.00140.227510.0014
state_identifier_array0.00080.134220.0004
Override
Cache load0.00170.2715230.0001
Sytem overhead
Fetch class attribute can translate value0.00070.110710.0007
Fetch class attribute name0.00100.155520.0005
XML
Image XML parsing0.00020.035010.0002
class_abstraction
Instantiating content class attribute0.00000.001120.0000
General
dbfile0.00060.1008100.0001
String conversion0.00000.001540.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs