diff --git a/modules/forum/forum.install b/modules/forum/forum.install
index b727c11..b7e3f5e 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',
@@ -219,6 +226,7 @@ function forum_schema() {
     ),
     'indexes' => array(
       'forum_topics' => array('nid', 'tid', 'sticky', 'last_comment_timestamp'),
+      'tid' => array('tid'),
     ),
     'foreign keys' => array(
       'tracked_node' => array(
@@ -440,6 +448,20 @@ function forum_update_7003() {
 }
 
 /**
+ * Add cid field and index on tid to forum_index table.
+ */
+function forum_update_7004() {
+  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 eddac79..eb21407 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -792,10 +792,9 @@ function forum_forum_load($tid = NULL) {
 
   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->join('forum_index', 'f', 'n.nid = f.nid');
+    $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)
@@ -824,13 +823,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->join('forum_index', 'f', 'n.nid = f.nid');
+    $query->join('comment', 'c', 'f.cid = c.cid');
+    $query->join('users', 'u2', 'c.uid = u2.uid');
+    $query->addField('f', 'last_comment_timestamp');
+    $query->addField('c', 'uid', 'last_comment_uid');
+    $query->addExpression('COALESCE(c.name, u2.name)', 'last_comment_name');
 
     $topic = $query
-      ->fields('ncs', array('last_comment_timestamp', 'last_comment_uid'))
+      ->condition('f.tid', $forum->tid)
       ->condition('n.status', 1)
       ->orderBy('last_comment_timestamp', 'DESC')
       ->range(0, 1)
@@ -1271,6 +1272,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)
@@ -1282,6 +1284,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)
