db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: Resetting ResultSet with first() or beforeFirst()
Date Wed, 09 Jun 2010 22:43:31 GMT
On 06/10/10 12:25 AM, Pavel Bortnovskiy wrote:
>
> Thank you, Knut.
>
> Is there a large performance penalty for specifying
> ResultSet.TYPE_SCROLL_INSENSITIVE, ||ResultSet.CONCUR_READ_ONLY?
> For the sake of efficiency, should my code set those only when it is
> necessary to reset the ResultSet?

TYPE_SCROLL_INSENSITIVE makes the ResultSet materialize the full result
as the application walks through it (in memory first, with overflow to
disk when the size of the data structure reaches a certain threshold),
so it has some overhead. But I've never tested how big the overhead is.

CONCUR_READ_ONLY is the default concurrency mode, so that shouldn't
affect the performance negatively.

-- 
Knut Anders


Mime
View raw message