Forums / General / database query slow on one of multiple sites

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?