db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew McIntyre" <mcintyr...@gmail.com>
Subject Re: Most efficient way to get max row id?
Date Tue, 21 Oct 2008 18:32:46 GMT
On Sun, Oct 19, 2008 at 1:52 PM, Amir Michail <amichail@gmail.com> wrote:
> Hi,
>
> I was wondering what is the most efficient way to get the max
> automatically generated row id.
>
> select max(...) is slow.

If this is an identity column, perhaps IDENTITY_VAL_LOCAL() suits your needs?

http://db.apache.org/derby/docs/10.4/ref/rrefidentityvallocal.html

andrew

Mime
View raw message