On Sat, Nov 13, 2010 at 9:03 AM, showsscel.ofbiz <[email protected]>wrote:
> Dear All: > Is there a find [method] that can one by one page return result in > GenericDelegator? On the application system when very large data get all > data is long time. So one by one page return result is very quick! > > Partial selects are a universal problem with RDMS. In systems that allow persistent connections and long-running transactions you can use open cursors, but we don't have that luxury, especially not in a framework that must be independent of the database implementation. In order to make meaningful partial selects, the query must first of all define a total order so that you can get a result set for "a page" or whatever unit that you need. Since we can not make an assumption like that for a general case, it's not really reasonable to make this optimization in the delegator. With that in mind, consider the approach that paginating screens are using. Look at how performFind queries work, with the EntityListIterator, such as in the Facility app for InventoryItems. This design is efficient enough for millions of inventory rows when running on modest hardware. -- James McGill Phoenix AZ
