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 2020/09/12 05:16:38 UTC

[GitHub] [shardingsphere] sandynz opened a new issue #7419: Make SQLParseResultCache maximum cached elements size customizable

sandynz opened a new issue #7419:
URL: https://github.com/apache/shardingsphere/issues/7419


   ## Feature Request
   
   ### Is your feature request related to a problem?
   No error, it might hurt performance.
   
   ### Describe the feature you would like.
   Currently, `SQLParseResultCache` has maximum cached elements size `65535`.
   In some scenario, routed sql will be parsed again. Since logical table has been rewritten as physical table, it need more cache.
   


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



[GitHub] [shardingsphere] tristaZero commented on issue #7419: Make SQLParseResultCache maximum cached elements size customizable

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #7419:
URL: https://github.com/apache/shardingsphere/issues/7419#issuecomment-691782073


   > In some scenario, routed sql will be parsed again
   Does `Some scenarios` mean `SQLParseResultCache` reach its capacity?
   
   Do you have any suggestions or ideas?


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



[GitHub] [shardingsphere] sandynz commented on issue #7419: Make SQLParseResultCache maximum cached elements size customizable

Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #7419:
URL: https://github.com/apache/shardingsphere/issues/7419#issuecomment-692665402


   > 
   > 
   > > It might reach its capacity. For example, if t_order has 100 shardings, then one sql might be 100 different sqls after rewriting, t_order -> t_order_0, t_order_1, ..., t_order_99.
   > 
   > I am not sure whether we have the consensus that `SQLParseResultCache` will only cache the SQL with logic table name `t_order`, don't we?
   
   That's true, it's better to cache sql with logic table name. I just find a new scenario.
   If `maximumSize` is customizable, it might be better to use sql parser as individual library.
   
   And that's ok to keep it unchanged, I have some workaround.
   
   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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tristaZero commented on issue #7419: Make SQLParseResultCache maximum cached elements size customizable

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #7419:
URL: https://github.com/apache/shardingsphere/issues/7419#issuecomment-693150634


   Got it, so do you think we should close this one?


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



[GitHub] [shardingsphere] sandynz commented on issue #7419: Make SQLParseResultCache maximum cached elements size customizable

Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #7419:
URL: https://github.com/apache/shardingsphere/issues/7419#issuecomment-692133227


   > 
   > 
   > > In some scenario, routed sql will be parsed again
   > > Does `Some scenarios` mean `SQLParseResultCache` reach its capacity?
   
   It might reach its capacity. For example, if t_order has 100 shardings, then one sql might be 100 different sqls after rewriting, t_order -> t_order_0, t_order_1, ..., t_order_99.
   
   > 
   > Do you have any suggestions or ideas?
   
   Could we initialize `maximumSize` in `SQLParseResultCache` and `StandardSQLParserEngine` constructor?
   


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



[GitHub] [shardingsphere] sandynz closed issue #7419: Make SQLParseResultCache maximum cached elements size customizable

Posted by GitBox <gi...@apache.org>.
sandynz closed issue #7419:
URL: https://github.com/apache/shardingsphere/issues/7419


   


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



[GitHub] [shardingsphere] tristaZero commented on issue #7419: Make SQLParseResultCache maximum cached elements size customizable

Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #7419:
URL: https://github.com/apache/shardingsphere/issues/7419#issuecomment-692444448


   > It might reach its capacity. For example, if t_order has 100 shardings, then one sql might be 100 different sqls after rewriting, t_order -> t_order_0, t_order_1, ..., t_order_99.
   
   I am not sure whether we have the consensus that `SQLParseResultCache` will only cache the SQL with logic table name `t_order`, don't we?


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