Hi Indika,
A 'SKIP <n> LIMIT <m>' query has no choice but reading through those <n> initial rows before returning the desired <m> rows after those - how else would it determine where to start with those <m> rows? So the bigger the <n>, the longer this step is going to take.
Now you're stating you need to get 20000 rows each day, so <m> should be 20000 in each such query while you're incrementing your <m> by 20000 each time. If true, this might not only give you many more rows than desired, it will also prolong the run time, esp. given that ORDER BY clause.
That said, and not knowing your exact intentions behind this approach: yesterday's <n> might be a different set of rows from today's (identical) <n>, and the database would not guarantee you today's <m> rows being exactly the next ones after yesterday's - there could be overlaps or gaps. One reason: new inserts are not guaranteed to reside in a table in any particular order.
If 'col' is indexed, though, and new rows arriving with ever increasing 'col' values, your approach might make more sense - as long as the index is used for the query.
Couldn't your aim be reached using some ID column and a good WHERE clause instead?
BR,
Andreas
------------------------------
Andreas Legner
------------------------------