Re: Excessive queries while load balancing
Posted by: Todd Farmer
Date: September 24, 2013 08:46AM

Hi Egor,

If you're looking for the Connector/Java code, it should be in the package you downloaded (which includes both the .JAR file and a copy of the source code). If you can't find that, download it again from

It's hard to say what might be a cause of the behavior you report. The load-balance configuration uses the Java reflection API, and there is some overhead involved there, but unlikely to account for a 50% performance loss. More likely, there's something happening in your deployment causing slowness. For example, if you've added a second host, but connections cannot be made to that second host (it's down, or the user account isn't configured, or ...) and you haven't configured the global blacklist capability of Connector/Java (and it sounds as though you haven't, if you've only added "loadbalance:" to the JDBC URL), roughly half of all connection attempts will hang (until socketTimeout or connectTimeout) when that host is chosen during initial connection and rebalance operations.

Out of curiosity, this thread has a title, "Excessive queries" - is that something you actually observe? I'd be interested to hear more about that, if you actually see Connector/Java making additional queries when loadbalancing support is enabled (vs. simply longer runtimes for the same number of queries).

Hope that helps!

Todd Farmer
MySQL @ Oracle

Options: ReplyQuote

Written By
Re: Excessive queries while load balancing
September 24, 2013 08:46AM

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.