diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-03-05 00:29:28 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-03-05 00:29:28 +0100 |
commit | 785c75254e763a24cf56765ca9a7e02140982497 (patch) | |
tree | d8c45b63386804d81574c71a60bee9d3b2efa353 /phpBB/includes | |
parent | f3af5945e3675c4d799000908c88475ee7016ac4 (diff) | |
download | forums-785c75254e763a24cf56765ca9a7e02140982497.tar forums-785c75254e763a24cf56765ca9a7e02140982497.tar.gz forums-785c75254e763a24cf56765ca9a7e02140982497.tar.bz2 forums-785c75254e763a24cf56765ca9a7e02140982497.tar.xz forums-785c75254e763a24cf56765ca9a7e02140982497.zip |
[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
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/search/fulltext_mysql.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 52372a14d8..54cc894f6a 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -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); } /** |