Hi all,

I have the following question:

As Derby does not support the SQL Limit ( http://mail-archives.apache.org/mod_mbox/db-derby-dev/200411.mbox/%3c41A95632.3010301@debrunners.com%3e ) and

if I use java.sql.Statement.setMaxRows(X), does Derby stops scanning the tables when X rows are found, or it the statement just programatically limits the returned rows to X.
We have performance issues for a complex select query and we want to limit the scanning of the database for example - only to the first 10 found rows.

With other words - Does Derby have such an optimization to stop scanning the database when the first X results are found?

Regards,
Ivo