Open ozhyrenkov opened 5 years ago
Probably, solution is to change style of paging to such one, but this probably will work only for simple queries, so maybe additional parameter like _one_tablestatement or something will handle this performance problem?
SELECT *
FROM products
JOIN (SELECT id
FROM products
ORDER BY date
LIMIT 0, 10) AS t ON t.id = products.id;
With this approach it will be faster as it showed in research from first link in first post:
Me too. Have you optimized the problem? Thanks a lot.
I have logstash runnig in docker:
FROM docker.elastic.co/logstash/logstash-oss:6.2.2
And docker-compose:There is a pipeline.yml file:
Users-input is just a simple query like this:
Table raw_users has an indexes by id and updated_at
What jdbc_pagination is doing is, basically transforming query in dozen of such ones:
But such queries are extremely slow and the higher offset the slower query exeution, and table has ~37 mln rows. Here the reference about slowing the speed, it's because of late row lookups: http://devoluk.com/mysql-limit-offset-performance.html https://explainextended.com/2009/10/23/mysql-order-by-limit-performance-late-row-lookups/