Thursday, February 9, 2012

A fix for "SelectMethod= cursor"?

I haven't seen this mentioned anywhere, is this covered under the
"Update Performance" and/or "Updateable recordsets" headings? Having
to include that in the connection string greatly reduced our
performance in previous attempts to use SQL Server from our Java
application. If so I will start down the path of trying to convince
the powers that be of the need to switch from Oracle to SQL Server.
The main reason I got shot down before was performance of the free
drivers, and cost of the not-free drivers with good performance.
Thanks,
Ed
EdGmail wrote:
> I haven't seen this mentioned anywhere, is this covered under the
> "Update Performance" and/or "Updateable recordsets" headings? Having
> to include that in the connection string greatly reduced our
> performance in previous attempts to use SQL Server from our Java
> application. If so I will start down the path of trying to convince
> the powers that be of the need to switch from Oracle to SQL Server.
> The main reason I got shot down before was performance of the free
> drivers, and cost of the not-free drivers with good performance.
> Thanks,
> Ed
>
There is no way around the selectMethod=cursor setting if you want
transactional behavior, for example. Also, even with selectMethod=direct
the old MS driver will cache pretty much everything to memory.
Your choices are the new MS driver for SQL Server 2005 (a copy of the
JNetDirect driver, which is currently in beta and still works --
although undocumented -- with older versions of SQL Server) or jTDS (you
would probably be surprised that the performance and stability of jTDS
is at least comparable to that of the commercial drivers).
Disclaimer: I am a jTDS developer.
Alin,
The jTDS Project.
|||I remember now why the "SelectMethod=Cursor" was causing a problem. It
wasn't so much performance as it was causing exceptions when we tried
to do our initial system load with Ant and Torque. I never researched
it thoroughly, but apparently Torque (or ant) spawns threads which
attempt to clone the connection, which the original MS driver choked
on. We tried the JNetDirect driver and that worked OK w/o
"SelectMethod", but we (ok, managment) just didn't want to cough up the
dough for it. Is that particular problem addressed by jTDS or the new
MS driver?
Thanks,
Ed
|||EdGmail wrote:
> Is that particular problem addressed by jTDS or the new MS driver?
Actually that's only a problem of the DataDirect driver and its
derivatives, including the old MS driver. It's not a limitation of SQL
Server, so the other drivers don't have this issue.
Alin,
The jTDS Project.

No comments:

Post a Comment