Good day. There is a request:
select t1.id, t1.f1, t1.f2, t1.f3, t1.f4, t2.date, t3.f5, t2.f6, t2.f7 FROM ( select date, id, f7, f6, f8 FROM t2 WHERE t2.date >= ? and t2.date <= ? ) as t2 INNER JOIN t1 on t2.id = t1.f9 LEFT JOIN t3 on t2.f8=t3.id ORDER BY t2.date LIMIT 5499945,99999 The problem is that for large LIMIT OFFSET values, the request will be executed a terribly long time. What can be done as you can optimize.?
> <with id. This could give a big boost. In fact, you choose 5499945 extra records, sort them and then just throw them away. If id grew in time and you would have saved the lower bar where necessary id could not choose these records at all - Mike