Hi, after testing Drupal 7 performance thanks to the MySQL slow query log I've discovered that an index could be added to the nodequeue_nodes table.

More precisely when you use views for getting nodes in a nodequeue, there is a left join on the unindexed qid field like:

LEFT JOIN nodequeue_nodes nodequeue_nodes_node ON node.nid = nodequeue_nodes_node.nid AND nodequeue_nodes_node.qid = '2'

Adding an index to the qid field would speed up a bit the queries on big tables:

ALTER TABLE `nodequeue_nodes` ADD INDEX ( `qid` )

Thanks for the attention.

Comments

jenlampton’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

The qid field is already a primary key in the nodequeue_nodes table. The primary key is always indexed.