> > This is interesting, but you did not answer about the JDBC driver used.
Sorry I want being clear. What I meant by "6. The database being used is postgresql 8.1" was I am also using postgresql 8.1 as my database driver. Did you have a look at the use-iterator=true(minilang) > <use-iterator>(widget) option (entityListIterator) ? This uses a database > cursor for you. Yes I have. The EntityListIterator provides convenience methods to control the cursor on the ResultSet object and retrieving the current values in it. The use of cursor enables us to traverse through the values returned by the PreparedStatement. Cursors enables ofbiz to go to the desired position of the ResultSet and iterates the values from that position until the desired size of values is retrieved. Ofbiz also uses cursors to retrieve the size of the ResultSet by moving the current position to the last position and getting the index of that position. As far as usage of cursors and how it was implemented on Ofbiz is concerned, this was all I found necessary to highlight. Please correct me if I did miss some points. Regarding the benchmark times, I wasn't able to include it in my past posts but I think I should highlight the fact that the time used to get the desired range of values (partial or all) is almost insignificant as compared to the time to retrieve the ResultSet object from the PreparedStatement. As for a benchmark for retrieving partial all values through cursors from a given ResultSet (with or without limit-offset), that I haven't timed their performance. If need be, I can produce these benchmarks if it would be helpful. PS : I think I will make a FAQ, How to use cursor or LIMIT-OFFSET couple in > OFBiz... That would be very helpful but i think LIMIT-OFFSET cannot work with the existing paginate form generated by ofbiz. Looking at the code and doing some preliminary patching, the form bases the number of pages from the size of the (complete) list. Since by using LIMIT-OFFSET you're already getting the partial list, the form would not get the size of the complete list; pagination would therefore be incorrect. ~ Ian On Sat, Sep 20, 2008 at 10:14 PM, Jacques Le Roux < [EMAIL PROTECTED]> wrote: > This is interesting, but you did not answer about the JDBC driver used. > > I'm far from a DB specialist but maybe you could read > http://troels.arvin.dk/db/rdbms/ > This document explains some aspects of > CURSOR http://troels.arvin.dk/db/rdbms/#select-limit > and > LIMIT-OFFSET couple http://troels.arvin.dk/db/rdbms/#select-limit-offset. > > Did you have a look at the use-iterator=true(minilang) > <use-iterator>(widget) option (entityListIterator) ? This uses a database > cursor for you. > > I suppose your lack of OFBiz researches is the reason David did not answer > you, the cursor word should have make you aware ;o). Simply look for > "use-iterator" in *.java,*.xml file in Eclipse... > > Jacques > PS : I think I will make a FAQ, How to use cursor or LIMIT-OFFSET couple in > OFBiz...
