diff --git a/modules/forum/forum.install b/modules/forum/forum.install
index 57e116b..1b11f86 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(
@@ -463,5 +471,19 @@ function forum_update_7012() {
 }
 
 /**
+ * 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 575de36..7a1ec43 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -803,10 +803,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)
@@ -835,13 +834,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)
@@ -1337,7 +1338,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 +1352,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 +1364,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)
