JDBC Performance - Connections and Sockets

Bob Kline bkline at rksystems.com
Wed Jul 19 12:20:07 EDT 2000

On Wed, 12 Jul 2000, Mike Taylor wrote:

> The freeTDS driver seems to logon with username, password etc for
> each statement ....

I noticed the same thing when I was working on the 7.0 login and Unicode
support.  Does anyone know why this would be necessary?  In addition to
the performance penalty the original poster mentions, what would happen
in the following scenario:

 1. Client program logs on, issues some SQL queries.
 2. Client switches to second database with "USE somedb" statement.
 3. Client issues queries against second database.

If a new connection is created for each statement, using the defaulted
database (or the database specified in the URL, if present), won't step
3 get unexpected results?  In fact, some preliminary testing appears to
confirm this suspicion.

Bob Kline
mailto:bkline at rksystems.com

More information about the FreeTDS mailing list