Forums / General / Problem with fetch function same_classattribute_node

Problem with fetch function same_classattribute_node

Author Message

Pierre Déchanoz

Thursday 21 October 2010 2:50:39 am

Hello,

I have a problem with this fetch function.

This fetch is not optimized. When the ezcontentobject_attribute.contentclassattribute_id row isn't indexed, the database make a full scan on the table, and it's time consuming.

SELECT ezcontentobject_tree.node_id, ezcontentobject.name, ezcontentobject_tree.parent_node_id FROM ezcontentobject_tree, ezcontentobject, ezcontentobject_attribute WHERE ezcontentobject_attribute.data_text='127.0.1.3' AND ezcontentobject_attribute.contentclassattribute_id='414' AND ezcontentobject_attribute.contentobject_id=ezcontentobject.id AND ezcontentobject_attribute.version=ezcontentobject.current_version AND ezcontentobject_tree.contentobject_version=ezcontentobject.current_version AND ezcontentobject_tree.contentobject_id=ezcontentobject.id ORDER BY ezcontentobject.nameHello,