Question on MYSQL INNER JOIN

Events happening in the community are now at Drupal community events on www.drupal.org.
shyamala's picture

SELECT node.nid AS nid, node_data_field_article_image.field_article_image_fid AS node_data_field_article_image_field_article_image_fid, node_data_field_article_image.field_article_image_list AS node_data_field_article_image_field_article_image_list, node_data_field_article_image.field_article_image_data AS node_data_field_article_image_field_article_image_data, node.type AS node_type, node.vid AS node_vid, node.title AS node_title, node.nid AS node_nid, nodequeue_nodes_node.position AS nodequeue_nodes_node_position FROM node node 
INNER JOIN nodequeue_nodes nodequeue_nodes_node ON node.nid = nodequeue_nodes_node.nid AND nodequeue_nodes_node.qid = 14
LEFT JOIN content_field_article_image node_data_field_article_image ON node.vid = node_data_field_article_image.vid
WHERE (node.type in ('article')) AND (node.status <> 0) ORDER BY node_nid DESC, nodequeue_nodes_node_position ASC

How does this Query get executed? Does the inner join work on the resultant set of the where class? What is the effect of the order by? The concern is on a larger Node table will this be a bottle neck? Will the no of rows scanned be limited by the inner join?

This Query is constructed by Views module. We are using relationship to link the nodequeue and the nodes.

Comments

Explain

mikeytown2's picture

Put explain in front if the query and run it again; or use the dev version of the dbtuner module and look at the query section of the views admin UI, it will show the explain below the query.

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: