AnsweredAssumed Answered

SQL run long time

Question asked by sysoncloud on Aug 30, 2017
Latest reply on Sep 5, 2017 by janv

Hi,

I have a server running Alfresco 3.4.d community, DBA monitor one SQL run very slow,  the max time it cost 3.8 minutes, how to analysis the possible bottleneck or any idea?  thank you in advance.

 

select 
assoc.id as id,
parentNode.id as parentNodeId,
parentStore.protocol as parentNodeProtocol,
parentStore.identifier as parentNodeIdentifier,
parentNode.uuid as parentNodeUuid,
childNode.id as childNodeId,
childStore.protocol as childNodeProtocol,
childStore.identifier as childNodeIdentifier,
childNode.uuid as childNodeUuid,
assoc.type_qname_id as type_qname_id,
assoc.child_node_name_crc as child_node_name_crc,
assoc.child_node_name as child_node_name,
assoc.qname_ns_id as qname_ns_id,
assoc.qname_localname as qname_localname,
assoc.is_primary as is_primary,
assoc.assoc_index as assoc_index
from
alf_child_assoc assoc
join alf_node parentNode on (parentNode.id = assoc.parent_node_id)
join alf_store parentStore on (parentStore.id = parentNode.store_id)
join alf_node childNode on (childNode.id = assoc.child_node_id)
join alf_store childStore on (childStore.id = childNode.store_id)
where
parentNode.id = $1 and
childNode.type_qname_id in ($2,$3,$4,$5,$6,$7,$8,$9,$10)
order by assoc.assoc_index ASC, assoc.id ASC

Outcomes