MySQL Forums
Forum List  »  Performance

USE db; in Multi Tenant Environment takes lot of time
Posted by: Manjunath chennannavar
Date: October 28, 2013 10:54PM

Hi,

We have Multi Tenant Application. We have one MySQL Server having different database for each Tenant.(For example if we have 10 tenants we have corresponding 10 databases.).

We have One batch(Read & Write operations) which is running on all these tenants.
We had enabled JProfiler to collect the queries statistics.

The application is widely using USE db; (Switching the databases for every query.)
We found that this particular statement is taking 47% of the Overall time.

Please provide me the below information:-
1. What happens exactly when the "USE db;" command is fired.
2. How to optimize this?
3. I would like to understand the internals of this command.

Thanks in advance for the help.

Best Regards,
Manjunath.A.C

Options: ReplyQuote


Subject
Views
Written By
Posted
USE db; in Multi Tenant Environment takes lot of time
2127
October 28, 2013 10:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.