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/08/05 07:36:36 UTC

[GitHub] [incubator-shardingsphere] tuohai666 commented on issue #2774: OutOfMemoryError caused by excessive pagination

tuohai666 commented on issue #2774: OutOfMemoryError caused by excessive pagination
URL: https://github.com/apache/incubator-shardingsphere/issues/2774#issuecomment-518121907
 
 
   I don't know the implementation of MyCat, but I think ShardingSphere don't have the problem.
   
   ShardingSphere provide ways to save memory. Please follow the instructions below to reduce the memory cost.
   
   1. Make a stream ResultSet:
   **statement.setFetchSize(1);** 
   or
   jdbc:postgresql://127.0.0.1:5432/demo?**defaultRowFetchSize=1**
   
   2. Make sure the ExecuteEngine in MEMORY_STRICTLY Mode:
   I noticed your SQL will be full routed to 200 nodes. (Everyone need to avoid full routing)
   Any way, set the props max.connections.size.per.query more than 200. For example:
   **max.connections.size.per.query: 300**
   
   After 1&2, both jdbc and ShardingSphere will not fetch all data in memory.
   
   For more details: 
   https://mp.weixin.qq.com/s?__biz=MzUzNjgwODk2Mw==&mid=2247483679&idx=1&sn=ee7335b72b9105a53a55ee59b42358b1&chksm=faf1da73cd8653656b0c56ba852a98d67eb67f4f36e294a8c08507f5c3dc3b6897a90b99ea53&scene=0&key=4062b15c04f483fc1db8d4359b898767266e0bca63e1553ea724f2bf8a298d9cb0562f695b0804411c278e9e3db279cf63de75965c6f84781027c9ab8495334243939bbfc2f8ee21bacda90671addb29&ascene=1&uin=MTM1ODcxNDE1&devicetype=Windows+7&version=62060833&lang=zh_CN&pass_ticket=CdqzKWxf9iryvwQkRSxKqGt8Wz3LIqnQyhtmzMOC6eY%3D
   
   

----------------------------------------------------------------
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