diff options
Diffstat (limited to 'app/Models/EntryDAO.php')
| -rw-r--r-- | app/Models/EntryDAO.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index f184ab1fa..301a2ec49 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -352,6 +352,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { default: throw new FreshRSS_EntriesGetter_Exception('Bad order in Entry->listByType: [' . $order . ']!'); } + if ($firstId === '' && parent::$sharedDbType === 'mysql') { + $firstId = '9000000000' . '000000'; //MySQL optimization. Tested on MySQL 5.5 with 150k articles + } if ($firstId !== '') { $where .= 'AND e1.id ' . ($order === 'DESC' ? '<=' : '>=') . $firstId . ' '; } |
