I think that is because ojb does not add the LIMIT thing to the query. Only the objects in the range are materialized but everything is selected from the DB. I guess it is becasue it is not standard SQL, every DB has its own way.
2007/3/20, Björn Agel <[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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- mvg, Dennis