From 46249457d2b0b3a5201d98528e84cfe4e0fd4db4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 2 Jan 2009 21:12:31 +0000 Subject: - Patch #295283 by Damien Tournoud: created a better index for the default front page. --- modules/node/node.install | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'modules/node/node.install') diff --git a/modules/node/node.install b/modules/node/node.install index efad2e158..23775827e 100644 --- a/modules/node/node.install +++ b/modules/node/node.install @@ -108,7 +108,7 @@ function node_schema() { 'node_changed' => array('changed'), 'node_created' => array('created'), 'node_moderate' => array('moderate'), - 'node_promote_status' => array('promote', 'status'), + 'node_frontpage' => array('promote', 'status', 'sticky', 'created'), 'node_status_type' => array('status', 'type', 'nid'), 'node_title_type' => array('title', array('type', 4)), 'node_type' => array(array('type', 4)), @@ -406,6 +406,16 @@ function node_update_7001() { return $ret; } +/** + * Extend the node_promote_status index to include all fields required for the node page query. + */ +function node_update_7002() { + $ret = array(); + db_drop_index($ret, 'node', 'node_promote_status'); + db_add_index($ret, 'node', 'node_frontpage', array('promote', 'status', 'sticky', 'created')); + return $ret; +} + /** * End of 6.x to 7.x updates */ -- cgit v1.2.3