massive performance problem with q.setStartAtIndex() and q.setEndAtIndex()

Björn Agel <[email protected]>
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
hi there,

i figured out a performance problem with large tables using 
q.setStartAtIndex() and q.setEndAtIndex()
there are more than 100.000 entries in the table and a simple search 
which should return about 90.000 items still takes more than 10(!) seconds.
i am using the index methods to retrieve only 10 datasets per query out 
of these 90.000 total items using an iterator.

when i implement the same query directly as a sql command like:
"SELECT * FROM user WHERE name LIKE '%name%' LIMIT 50000,10"
the query takes less than 1 second ...

am i doing something wrong or is it a bug ?

with best regards,
Björn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.