Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
jenlamptonThe qid field is already a primary key in the nodequeue_nodes table. The primary key is always indexed.