mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-23 10:01:55 +02:00
[ticket/16940] Optimize phpBB Native Search
- Use `ORDER BY post_id ASC` for batch posts. PHPBB3-16940
This commit is contained in:
@@ -322,7 +322,8 @@ class acp_search
|
||||
{
|
||||
$sql = 'SELECT post_id, poster_id, forum_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_id > ' . (int) $post_counter;
|
||||
WHERE post_id > ' . (int) $post_counter . '
|
||||
ORDER BY post_id ASC';
|
||||
$result = $db->sql_query_limit($sql, $this->batch_size);
|
||||
|
||||
$ids = $posters = $forum_ids = array();
|
||||
@@ -392,7 +393,8 @@ class acp_search
|
||||
{
|
||||
$sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_id > ' . (int) $post_counter;
|
||||
WHERE post_id > ' . (int) $post_counter . '
|
||||
ORDER BY post_id ASC';
|
||||
$result = $db->sql_query_limit($sql, $this->batch_size);
|
||||
|
||||
$buffer = $db->sql_buffer_nested_transactions();
|
||||
|
Reference in New Issue
Block a user