Skip to content

Instantly share code, notes, and snippets.

@jywarren
Created May 12, 2015 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jywarren/6545430f4c2e8d12ce18 to your computer and use it in GitHub Desktop.
Save jywarren/6545430f4c2e8d12ce18 to your computer and use it in GitHub Desktop.
Old:
SQL (115.9ms) SELECT DISTINCT `node`.nid FROM `node` LEFT OUTER JOIN `node_revisions` ON `node_revisions`.`nid` = `node`.`nid` LEFT OUTER JOIN `node_counter` ON `node_counter`.`nid` = `node`.`nid` WHERE (status = 1 AND node.nid != 259 AND (type = 'page' OR type = 'tool' OR type = 'place')) ORDER BY node_revisions.timestamp DESC LIMIT 30 OFFSET 0
SQL (14.2ms) SELECT `node`.`nid` AS t0_r0, `node`.`vid` AS t0_r1, `node`.`type` AS t0_r2, `node`.`language` AS t0_r3, `node`.`title` AS t0_r4, `node`.`uid` AS t0_r5, `node`.`status` AS t0_r6, `node`.`created` AS t0_r7, `node`.`changed` AS t0_r8, `node`.`comment` AS t0_r9, `node`.`promote` AS t0_r10, `node`.`moderate` AS t0_r11, `node`.`sticky` AS t0_r12, `node`.`tnid` AS t0_r13, `node`.`translate` AS t0_r14, `node`.`cached_likes` AS t0_r15, `node`.`drupal_comments_count` AS t0_r16, `node`.`drupal_node_revisions_count` AS t0_r17, `node`.`path` AS t0_r18, `node_revisions`.`vid` AS t1_r0, `node_revisions`.`nid` AS t1_r1, `node_revisions`.`uid` AS t1_r2, `node_revisions`.`title` AS t1_r3, `node_revisions`.`body` AS t1_r4, `node_revisions`.`teaser` AS t1_r5, `node_revisions`.`log` AS t1_r6, `node_revisions`.`timestamp` AS t1_r7, `node_revisions`.`format` AS t1_r8, `node_counter`.`nid` AS t2_r0, `node_counter`.`totalcount` AS t2_r1, `node_counter`.`daycount` AS t2_r2, `node_counter`.`timestamp` AS t2_r3 FROM `node` LEFT OUTER JOIN `node_revisions` ON `node_revisions`.`nid` = `node`.`nid` LEFT OUTER JOIN `node_counter` ON `node_counter`.`nid` = `node`.`nid` WHERE `node`.`nid` IN (11801, 11797, 11794, 11789, 11788, 11787, 11776, 11739, 11728, 11712, 11706, 11705, 11704, 11703, 11702, 11701, 11700, 11699, 11692, 11691, 11689, 11688, 11678, 11675, 11667, 11650, 11626, 11625, 11606, 11595) AND (status = 1 AND node.nid != 259 AND (type = 'page' OR type = 'tool' OR type = 'place')) ORDER BY node_revisions.timestamp DESC
New:
SQL (880.2ms) SELECT `node`.`nid` AS t0_r0, `node`.`vid` AS t0_r1, `node`.`type` AS t0_r2, `node`.`language` AS t0_r3, `node`.`title` AS t0_r4, `node`.`uid` AS t0_r5, `node`.`status` AS t0_r6, `node`.`created` AS t0_r7, `node`.`changed` AS t0_r8, `node`.`comment` AS t0_r9, `node`.`promote` AS t0_r10, `node`.`moderate` AS t0_r11, `node`.`sticky` AS t0_r12, `node`.`tnid` AS t0_r13, `node`.`translate` AS t0_r14, `node`.`cached_likes` AS t0_r15, `node`.`drupal_comments_count` AS t0_r16, `node`.`drupal_node_revisions_count` AS t0_r17, `node`.`path` AS t0_r18, `node_revisions`.`vid` AS t1_r0, `node_revisions`.`nid` AS t1_r1, `node_revisions`.`uid` AS t1_r2, `node_revisions`.`title` AS t1_r3, `node_revisions`.`body` AS t1_r4, `node_revisions`.`teaser` AS t1_r5, `node_revisions`.`log` AS t1_r6, `node_revisions`.`timestamp` AS t1_r7, `node_revisions`.`format` AS t1_r8, `node_counter`.`nid` AS t2_r0, `node_counter`.`totalcount` AS t2_r1, `node_counter`.`daycount` AS t2_r2, `node_counter`.`timestamp` AS t2_r3 FROM `node` LEFT OUTER JOIN `node_revisions` ON `node_revisions`.`nid` = `node`.`nid` LEFT OUTER JOIN `node_counter` ON `node_counter`.`nid` = `node`.`nid` WHERE (status = 1 AND (type = 'page' OR type = 'tool' OR type = 'place')) ORDER BY node_revisions.timestamp DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment