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

   In my team, some databases were divided into databases by month, resulting 
in the increase of databases. When myCAT was replaced with Sharding, I noticed 
that the startup was slow due to too many database links.
   Through debugging positioning code found in org. Apache. Shardingsphere. 
Infra. Database. The type of getDatabaseType (final Collection < DataSource > 
dataSources) The method is a little slow
   ![截屏2022-04-20 11 01 
03](https://user-images.githubusercontent.com/50144235/164141988-4081016c-1545-4035-97e2-77e7e6d0e376.png)
   I'm going to change it a little bit here
   ![截屏2022-04-20 11 08 
02](https://user-images.githubusercontent.com/50144235/164142458-f88ccf91-35c4-473c-a20c-ee6366b40919.png)
   Before the change, my project started waiting about 3 minutes and 30 seconds 
for a database queue link, and after the change, only 40 seconds.
   I'm just going to do a demo here, hoping that the authorities can optimize 
this code so that when the number of database links is high, the long startup 
always causes people to wait
   Thread pool example.
   ![截屏2022-04-20 11 08 
35](https://user-images.githubusercontent.com/50144235/164143284-ad6f8fa1-17b4-4897-99b7-512fbbe40009.png)
   
   


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