1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-17 22:28:46 +01:00

[ticket/9813] Also use estimated row count of posts table for fulltext mysql.

Since this is 'only' for statistics anyway, using an estimated value does no
harm. Also, if MyISAM is the underlying storage engine for the posts table,
the value will actually be exact.

PHPBB3-9813
This commit is contained in:
Andreas Fischer 2012-03-05 00:29:28 +01:00
parent f3af5945e3
commit 785c75254e

View File

@ -896,11 +896,7 @@ class fulltext_mysql extends search_backend
}
$db->sql_freeresult($result);
$sql = 'SELECT COUNT(post_id) as total_posts
FROM ' . POSTS_TABLE;
$result = $db->sql_query($sql);
$this->stats['total_posts'] = (int) $db->sql_fetchfield('total_posts');
$db->sql_freeresult($result);
$this->stats['total_posts'] = $db->get_estimated_row_count(POSTS_TABLE);
}
/**