TeslaCN opened a new issue, #18738:
URL: https://github.com/apache/shardingsphere/issues/18738

   ## Refactor
   
   ### Which version of ShardingSphere did you use?
   
   5.1.2
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy
   
   ### Actual behavior
   
   If we execute SQL (SET statement) like the following, 
`BroadcastDatabaseBackendHandler` will execute SQL in all data sources of all 
logic databases (schemas).
   ```sql
   set sql_mode = ''
   ```
   
   Why shouldn't Proxy broadcast SQL to all logic data sources?
   - It is expensive if there are too many data sources.
   - PostgreSQL's connection is created with fixed database, which cannot be 
changed on the fly.
   - If the SET statement worked in session scope, the connections used to 
execute the SQL will be returned to data sources, which pollutes connections in 
data sources. This issue cannot cure this problem, but may reduce the impact of 
pollution. 
   


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to