Which query takes 63 hours of cummulative wait time to process on Drupal.org?

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

7348 Queries

Taking 16 to 46 seconds to complete

SELECT n.nid, n.title, l.comment_count FROM node n INNER JOIN node_comment_statistics l ON n.nid = l.nid WHERE n.type = 'XXX' AND n.status = XXX ORDER BY n.nid DESC LIMIT XXX, XXX;

63 hours total, assuming an average time of 31 seconds.

3574 Queries

Taking 16 to 67 seconds to complete

41 hours total, assuming an average of 41.5 seconds

SELECT n.nid, n.title, n.sticky, l.comment_count, l.last_comment_timestamp FROM node n INNER JOIN node_comment_statistics l ON n.nid = l.nid INNER JOIN term_node r ON n.nid = r.nid AND r.tid = XXX WHERE n.status = XXX AND n.type = 'XXX' ORDER BY n.sticky DESC, l.last_comment_timestamp desc;

Comments

New forums topics block is below the fold

Amazon's picture

Talking with Khalid.

This query is on line:
271 $sql = db_rewrite_sql("SELECT n.nid, n.title, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n .type = 'forum' AND n.status = 1 ORDER BY n.nid DESC");

of the forum module. It is the new forum topics block that is loaded on every authenticated page. Unfortunately, it's frequently below the fold so it often unused for authenticated users. Perhaps simply disabling this block and making it able to be enabled would help.

To seek, to strive, to find, and not to yield

New Drupal career! Drupal profile builders.
Try pre-configured and updatable profiles on CivicSpaceOnDemand

This block was removed today

Amazon's picture

This block was removed today. We are waiting for results of the next MySQL slow query log to see if there has been a cumulative improvement. Initial observations were that it wasn't making much difference.

Cheers,
Kieran

To seek, to strive, to find, and not to yield

New Drupal career! Drupal profile builders.
Try pre-configured and updatable profiles on CivicSpaceOnDemand

Most recent forum posts now fixed in block cache

Amazon's picture

Drupal.org is now running the most recent forum posts block using the block cache.

Cheers,
Kieran

To seek, to strive, to find, and not to yield

New Drupal career! Drupal profile builders.
Try pre-configured and updatable profiles on CivicSpaceOnDemand