Hi,

> Is there anything I can do to improve the performance?

Yes, create a descending index. Example:

drop table test;
create table test(id int not null);
create primary key on test(id desc);
insert into test select x from system_range(1, 100000);
select id from test where id <= 50000 order by id desc limit 1;
explain select id from test where id <= 50000 order by id desc limit 1;

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to