Re: Sp_CursorOpen,Fetch,Close
From: Alin Sinpalean (alin_at_earthling.net)
Date: 01/26/05
- Next message: Alin Sinpalean: "Re: Urgen Help - Getting Error using JDBC"
- Previous message: chinn: "Sp_CursorOpen,Fetch,Close"
- In reply to: chinn: "Sp_CursorOpen,Fetch,Close"
- Next in thread: chinn: "Re: Sp_CursorOpen,Fetch,Close"
- Reply: chinn: "Re: Sp_CursorOpen,Fetch,Close"
- Messages sorted by: [ date ] [ thread ]
Date: 26 Jan 2005 15:25:22 -0800
chinn wrote:
> I have an application when i run a trace against i see a lot of those
> sp_cursoropen,fetch,close
> statements but they don't use ADO the app uses JDBC drivers(I think
MS-JDBC).
> Will above explaination applies to my situation or only applies to
ADO.If so
> could please let me know where the
> cachesize property setting can be done..
JDBC drivers can and do use the sp_cursor stored procedures just as ADO
does (you could do it also directly from an application, the only
problem is that they are undocumented).
The JDBC equivalent for the ADO CacheSize property is "fetch size".
Fetch size can be set for a Statement (and it will be applied to all
ResultSets created from that Statement) or directly for a ResultSet (by
calling setFetchSize() ). Unfortunately the fetch size is just an
indication and a driver may choose to ignore it as it doesn't affect
behavior, only performance; the MS JDBC driver choses to ignore it.
So if you want to improve SELECT performance you will have to switch
drivers; either use a commercial driver or jTDS (
http://jtds.sourceforge.net/ ). With these fetch size actually works
and the difference in performance is considerable.
Disclaimer: I'm a jTDS developer, so my oppinions might not be totally
impartial.
Alin Sinpalean,
The jTDS Project.
- Next message: Alin Sinpalean: "Re: Urgen Help - Getting Error using JDBC"
- Previous message: chinn: "Sp_CursorOpen,Fetch,Close"
- In reply to: chinn: "Sp_CursorOpen,Fetch,Close"
- Next in thread: chinn: "Re: Sp_CursorOpen,Fetch,Close"
- Reply: chinn: "Re: Sp_CursorOpen,Fetch,Close"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|