jackjoesh commented on issue #9616:
URL: https://github.com/apache/shardingsphere/issues/9616#issuecomment-809874111


   > For now the prepStmtCacheSize is 250. Much more time will be cost when the 
prepared statements count is over this size. The effect is significant.
   > 
   > After I increase the prepStmtCacheSize, the qps of oltp_point_select is 
increased by 12% (from 77853 to 87284).
   > 
   > 
![image](https://user-images.githubusercontent.com/24643893/110457440-9afca400-8105-11eb-92c5-b395a4357a7b.png)
   > 
   > If a preparedStatement is in cache, execute an SQL will always send a 
**Request Close Statement**.
   > 
   > If a preparedStatement is removed from the cache, The command **Request 
Close Statement** will be sent from the Proxy to MySQL server. And the 
following same SQL needs to be prepared again via command **Request Prepare 
Statement**.
   > 
   > Both the **Request Close Statement** and the new **Request Prepare 
Statement** are additional cost compare with the single **Request Execute 
Statement**
   
   if increase the prepStmtCacheSize from 250 to 200000 ,  will it cost much 
memory?  If a application has sharded to 20 dbs, is it dangerous? 


-- 
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:
[email protected]


Reply via email to