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 2022/05/13 06:14:56 UTC
[GitHub] [shardingsphere] LuwendiWuyi opened a new issue, #17628: Use Sharding-jdbc to query data by "limit A offset B", the Tomcat gives a OOM error
LuwendiWuyi opened a new issue, #17628:
URL: https://github.com/apache/shardingsphere/issues/17628
When I use Sharding-jdbc to query table A's data with 'limit num1 offset num2', the tomcat gives a OOM error.
1.The original sql is:
select ELC_NO, ELC_ID,...,ORG_NO from eqelcmst where ORG_NO in (?,?,?,?,?,?) order by ELC_NO desc limit 9 OFFSET 76323501
2.The two actual sqls are:
select ELC_NO, ELC_ID,...,ORG_NO from eqelcmst1 where ORG_NO in (?,?,?,?,?,?) order by ELC_NO desc limit 76323510 OFFSET 0
select ELC_NO, ELC_ID,...,ORG_NO from eqelcmst3 where ORG_NO in (?,?,?,?,?,?) order by ELC_NO desc limit 76323510 OFFSET 0
It seems that Sharding query the whole table's data and the OOM happens.
I want to get help to solve this question, Thanks!
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #17628: Use Sharding-jdbc to query data by "limit A offset B", the Tomcat gives a OOM error
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #17628:
URL: https://github.com/apache/shardingsphere/issues/17628#issuecomment-1182050880
Closed because of no feedback for long time
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu commented on issue #17628: Use Sharding-jdbc to query data by "limit A offset B", the Tomcat gives a OOM error
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #17628:
URL: https://github.com/apache/shardingsphere/issues/17628#issuecomment-1164460559
Can you provide the full stack trace?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed issue #17628: Use Sharding-jdbc to query data by "limit A offset B", the Tomcat gives a OOM error
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #17628: Use Sharding-jdbc to query data by "limit A offset B", the Tomcat gives a OOM error
URL: https://github.com/apache/shardingsphere/issues/17628
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #17628: Use Sharding-jdbc to query data by "limit A offset B", the Tomcat gives a OOM error
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #17628:
URL: https://github.com/apache/shardingsphere/issues/17628#issuecomment-1125755435
Hi @LuwendiWuyi Could you consider refactoring your pagination? Doing large offset is not a good practice in sharding scenario. You may refer to https://shardingsphere.apache.org/document/current/en/reference/sharding/rewrite/#pagination-revision
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org