Sunday, February 19, 2012

Help with JDBC Driver

Hello all,

I have a question about the SQL Server JDBC driver. I was wondering if
anyone knows what the default prefetch size is (in number of rows).
Also, does anyone know if an entire packet is sent (i.e. padded with
null values) if there is not enough data to fill it?

Thanks for your help!

tyTy,

The default fetch size with the MS driver is 1 in cursor mode and
"cache everything" in direct mode. These are basically the worst
choices possible: in cursor mode a fetch size of 1 will cause a request
to be made for each retrieved row and in direct mode there is normally
no need to cache the results to memory, they can be read on an "as
needed" basis.

With jTDS (of which I'm a developer) the default fetch size is of 100
rows for server side cursor based ResultSets (i.e.
scrollable/updateable) and no prefetching is done for direct executions
(i.e. fire hose cursors).

Please note that with both drivers you can set the fetch size you want
instead of the default.

Alin,
The jTDS Project.|||Hi Alin,

Thanks for the information!

ty

In article <1113635743.295152.122440@.z14g2000cwz.googlegroups. com>,
Alin Sinpalean <alin@.earthling.net> wrote:

> Ty,
> The default fetch size with the MS driver is 1 in cursor mode and
> "cache everything" in direct mode. These are basically the worst
> choices possible: in cursor mode a fetch size of 1 will cause a request
> to be made for each retrieved row and in direct mode there is normally
> no need to cache the results to memory, they can be read on an "as
> needed" basis.
> With jTDS (of which I'm a developer) the default fetch size is of 100
> rows for server side cursor based ResultSets (i.e.
> scrollable/updateable) and no prefetching is done for direct executions
> (i.e. fire hose cursors).
> Please note that with both drivers you can set the fetch size you want
> instead of the default.
> Alin,
> The jTDS Project.

No comments:

Post a Comment