Re: Why is useLocalSessionState false by default
Posted by: Todd Farmer
Date: January 07, 2015 10:47AM

Hi Florian,

What version of Connector/Java are you using? You might consider testing with the most recent version, if you are not already using it - I believe most calls you're trying to suppress have already been addressed.

That said, useLocalSessionState is disabled by default because it is safest to do so. People things like conn.createStatement().execute("SET auto_commit = OFF") instead of conn.setAutoCommit(false). Connector/Java doesn't parse every command to ensure local session state remains consistent, and relies on applications using standard JDBC API methods to track changes. That's not always a good assumption, but if it is for your use case, enabling useLocalSessionState can result in meaningful performance benefits.

Hope that helps!

--
Todd Farmer
MySQL @ Oracle
http://www.oracle.com/mysql/

Options: ReplyQuote


Subject
Written By
Posted
Re: Why is useLocalSessionState false by default
January 07, 2015 10:47AM


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.