You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe enhance the LIMIT array optionally by a name for the primary index.
So if we call new Medoo('table', "*", ['LIMIT' => [100000, 10, 'id'], 'ORDER' => ['date' => 'asc']]);
the resulting query would be SELECT * FROM table a JOIN (SELECT id FROM table ORDER BY date ASC LIMIT 100000, 10) AS b ON a.id = b.id
which should be pretty damn fast... ;)
If the third value in the LIMIT array isn't given, it remains as it is currently: SELECT * FROM table ORDER BY date ASC LIMIT 100000, 10
The text was updated successfully, but these errors were encountered:
What's your experience on large offset values in big tables? Let's say with an offset value of 100000?
As stated here for example: http://devoluk.com/mysql-limit-offset-performance.html
Maybe enhance the LIMIT array optionally by a name for the primary index.
So if we call
new Medoo('table', "*", ['LIMIT' => [100000, 10, 'id'], 'ORDER' => ['date' => 'asc']]);
the resulting query would be
SELECT * FROM table a JOIN (SELECT id FROM table ORDER BY date ASC LIMIT 100000, 10) AS b ON a.id = b.id
which should be pretty damn fast... ;)
If the third value in the LIMIT array isn't given, it remains as it is currently:
SELECT * FROM table ORDER BY date ASC LIMIT 100000, 10
The text was updated successfully, but these errors were encountered: