Hi Scott, Thanks Ill look into those as well. And I agree with your second point. I dont show the whole list since this would easily result to an OutOfMemoryException for our customized UI. I usually show them in batches of 50s. Thanks for all your input.
--- Ian Tabangay On Wed, Nov 11, 2009 at 4:55 PM, Scott Gray <[email protected]>wrote: > Usually the reason for the slow query time when using the iterator is > because your database isn't actually capable of providing cursors and it is > actually the entire result set being loaded. For example MySQL will only > use a cursor if you use a forward only result + you need to set your fetch > size to Integer.MIN_VALUE (or whatever that constant is called). In those > cases where you don't have a cursor using the entity iterator isn't much > different from not using it. > > Setting max rows is the main way to get around these sorts of problems. > Aside from the non standardness of using an offset, the only time I've > really seen a good potential use for it is in list pagination but even then > if a user is attempting to view page 1000 then I think it's more of a UI > issue than anything else. IMO if the user can quickly view any of the first > maybe 50 odd pages then that it perfectly fine. > > Regards > Scott
