You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/07/27 06:19:44 UTC

[GitHub] [incubator-shardingsphere] jimmycheng888 opened a new issue #2774: OutOfMemoryError caused by excessive pagination

jimmycheng888 opened a new issue #2774: OutOfMemoryError caused by excessive pagination
URL: https://github.com/apache/incubator-shardingsphere/issues/2774
 
 
   ### Which version of ShardingSphere did you use?
   3.1.0
   ### Which project did you use? Sharding-JDBC or Sharding-Proxy?
   shardingsphere(Sharding-JDBC)
   ### Reason analyze (If you can)
   I am using the postgresql database, I have adopted the strategy of sub-tables, my number of sub-tables is more than 200 tables, all the data amounts add up to 8000000, when I do a paged query and the OutOfMemoryError occurs for the last page, When I printed sql, I understood why, because the system sql rewrite function, changed the page, and then sorted the memory, but all of the tables queryed a large amount of data, resulting in exceeding my JVM settings. Memory, I have queried the official documentation, said that it is best to paginate each time, can index by ID, and then pagination, but my business scene is not allowed, because the customer will click on any page, which leads me to not follow Id index query, for example: select * from t_user limit 10 offset 50000, such sql will be rewritten as select * from t_user limit 50000 offset 0, I think this is a super serious bug, even if at any time should I want to click Any number of pages, and should not be paged according to ID, which is too destructive to the business, does not meet the business structure rules, hope to be as soon as possible solve

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services