I'm seeing significant delays when using Hibernate (3.3.2) in combination with Derby (10.5.1) and attempting to paginate my query results.
When setting setMaxResults(1), I'm seeing a 15 second delay from the time I execute the .list() until the result set (instance) is returned. (Note - this is a query on a very simple table schema no relationships to other tables). I've included setFetchSize(1) as well, even tho it's unnecessary on my simple table, and have not seen any improvement here either.
I'm willing to believe this is a newbie issue, however the same source code (without any modifications), returns in milliseconds with mySQL. Additionally the other ORM I've prototyped on Derby, Cayenne, also returns sub-1 second... a pretty good indication that it's Hibernate and not my code / schema.
-Has anyone else seen this issue?
-Any suggestions for workarounds? I really don't want to replace Hibernate with Cayenne unless I absolutely have to.
|