Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JDBC ResultSet close() takes ages

1 view
Skip to first unread message

Dojolava

unread,
Aug 7, 2009, 8:12:01 AM8/7/09
to
Hi,

when I use SelectMethod 'direct' and I have a 'text' (longvarchar) column
in my select clause, then it takes up to 5 minutes to close the ResultSet.

If I remove the one column which is type 'text', then everything is fine.
Also if I use SelectMethod 'cursor' its closing fast, but then the overall
performance is much slower.

I use the newest 2.0 sqljdbc4.jar driver.

Can anybody help?

someonehashackedmyaccount

unread,
Aug 7, 2009, 8:27:30 AM8/7/09
to
On Aug 7, 5:12 am, Dojolava <Dojol...@discussions.microsoft.com>
wrote:

In the direct mode, you're telling the DBMS to send all the
rows with all the data you requested, all at once. The driver
is going to have to read all that off the line before it can get
anything else, and that cleanup is being done when you
call close() (in this mode).
The real solution is to tighten up your query so it only
returns the data you want, so there's nothing extra left
behind that has to be read and thrown away under the covers.
Joe Weinstein at Oracle

0 new messages