diff --git a/modules/forum/forum.install b/modules/forum/forum.install
index 57e116b711..1b11f86d59 100644
--- a/modules/forum/forum.install
+++ b/modules/forum/forum.install
@@ -175,6 +175,13 @@ function forum_schema() {
         'not null' => TRUE,
         'default' => 0,
       ),
+      'cid' => array(
+        'description' => 'The {comment}.cid of the last comment.',
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE,
+        'default' => 0,
+      ),
       'title' => array(
         'description' => 'The title of this node, always treated as non-markup plain text.',
         'type' => 'varchar',
@@ -221,6 +228,7 @@ function forum_schema() {
       'forum_topics' => array('nid', 'tid', 'sticky', 'last_comment_timestamp'),
       'created' => array('created'),
       'last_comment_timestamp' => array('last_comment_timestamp'),
+      'tid' => array('tid'),
     ),
     'foreign keys' => array(
       'tracked_node' => array(
@@ -462,6 +470,20 @@ function forum_update_7012() {
   db_add_index('forum_index', 'last_comment_timestamp', array('last_comment_timestamp'));
 }
 
+/**
+ * Add cid field and index on tid to forum_index table.
+ */
+function forum_update_7013() {
+  db_add_field('forum_index', 'cid', array(
+    'description' => 'The {comment}.cid of the last comment.',
+    'type' => 'int',
+    'unsigned' => TRUE,
+    'not null' => TRUE,
+    'default' => 0,
+  ));
+  db_add_index('forum_index', 'tid', array('tid'));
+}
+
 /**
  * @} End of "addtogroup updates-7.x-extra".
  */
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index 1224418a9f..61b032bd4b 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -802,15 +802,13 @@ function forum_forum_load($tid = NULL) {
   $_forums = taxonomy_get_tree($vid, $tid);
 
   if (count($_forums)) {
-    $query = db_select('node', 'n');
-    $query->join('node_comment_statistics', 'ncs', 'n.nid = ncs.nid');
-    $query->join('forum', 'f', 'n.vid = f.vid');
-    $query->addExpression('COUNT(n.nid)', 'topic_count');
-    $query->addExpression('SUM(ncs.comment_count)', 'comment_count');
+    $query = db_select('forum_index', 'f');
+    $query->addExpression('COUNT(f.nid)', 'topic_count');
+    $query->addExpression('SUM(f.comment_count)', 'comment_count');
     $counts = $query
       ->fields('f', array('tid'))
-      ->condition('n.status', 1)
       ->groupBy('tid')
+      ->orderBy('NULL')
       ->addTag('node_access')
       ->execute()
       ->fetchAllAssoc('tid');
@@ -833,16 +831,15 @@ function forum_forum_load($tid = NULL) {
     }
 
     // Query "Last Post" information for this forum.
-    $query = db_select('node', 'n');
-    $query->join('users', 'u1', 'n.uid = u1.uid');
-    $query->join('forum', 'f', 'n.vid = f.vid AND f.tid = :tid', array(':tid' => $forum->tid));
-    $query->join('node_comment_statistics', 'ncs', 'n.nid = ncs.nid');
-    $query->join('users', 'u2', 'ncs.last_comment_uid = u2.uid');
-    $query->addExpression('CASE ncs.last_comment_uid WHEN 0 THEN ncs.last_comment_name ELSE u2.name END', 'last_comment_name');
+    $query = db_select('forum_index', 'f');
+    $query->join('comment', 'c', 'f.cid = c.cid');
+    $query->join('users', 'u', 'c.uid = u.uid');
+    $query->addField('f', 'last_comment_timestamp');
+    $query->addField('c', 'uid', 'last_comment_uid');
+    $query->addExpression('COALESCE(c.name, u.name)', 'last_comment_name');
 
     $topic = $query
-      ->fields('ncs', array('last_comment_timestamp', 'last_comment_uid'))
-      ->condition('n.status', 1)
+      ->condition('f.tid', $forum->tid)
       ->orderBy('last_comment_timestamp', 'DESC')
       ->range(0, 1)
       ->addTag('node_access')
@@ -1337,7 +1334,7 @@ function _forum_get_topic_order($sortby) {
  *   The ID of the node to update.
  */
 function _forum_update_forum_index($nid) {
-  $count = db_query('SELECT COUNT(cid) FROM {comment} c INNER JOIN {forum_index} i ON c.nid = i.nid WHERE c.nid = :nid AND c.status = :status', array(
+  $count = db_query('SELECT COUNT(c.cid) FROM {comment} c INNER JOIN {forum_index} i ON c.nid = i.nid WHERE c.nid = :nid AND c.status = :status', array(
     ':nid' => $nid,
     ':status' => COMMENT_PUBLISHED,
   ))->fetchField();
@@ -1351,6 +1348,7 @@ function _forum_update_forum_index($nid) {
     db_update('forum_index')
       ->fields( array(
         'comment_count' => $count,
+        'cid' => $last_reply->cid,
         'last_comment_timestamp' => $last_reply->created,
       ))
       ->condition('nid', $nid)
@@ -1362,6 +1360,7 @@ function _forum_update_forum_index($nid) {
     db_update('forum_index')
       ->fields( array(
         'comment_count' => 0,
+        'cid' => 0,
         'last_comment_timestamp' => $node->created,
       ))
       ->condition('nid', $nid)
