mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/16940] Optimize phpBB Native Search
- Use `ORDER BY post_id ASC` for batch posts. PHPBB3-16940
This commit is contained in:
parent
cccf01447f
commit
c7856ce162
1 changed files with 4 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue