Hi, So, let's add caching to the equation. Will the caching mechanism cache the entire results of a query, or simply the paginated "section" of the result set?
My assumption is that it will cache the whole result set, or at least as much as the cache definition allows. Thanks! Ted On 12/04/06, Yusuf <[EMAIL PROTECTED]> wrote: > I think it's better off making the paging logic yourself in the > application, and then querying only the records you want to show, for > example in oracle you can use the rownum to fetch the data like > > select * from > (select rownum row, a.* from tabel1 as a) > where row between 21 and 30 > > because using the queryForPaginatedList (without caching) will always > fetch the entire result and then showing only the selected records, and > if the record count is high (like thousands..) then the performance will > be bad. > > cmiiw, > Yusuf. > > -----Original Message----- > From: John Chien [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 12, 2006 11:27 PM > To: [email protected] > Subject: Re: pager in ibatis > > > L:arry: > > Thank you for the information. > The queryForPaginatedList() will return a list, then I can check for the > > existence of successive records by calling the isNextPageAvailable(). > and go to that page by calling gotoPage(); > > However, I can not keep this list in my server due to concurrecy reason. > Does that mean that I have to call the same method every time and give > it the page number for it to return me the records ? > > I am doing the web development. > How can I make use of this returned list in JSP with Struct development > ? > > Should I keep the list in the session or request scope ? > > Thanks, > > John Chien > > Larry Meadors wrote: > > >queryForPaginatedList() > > > >Larry > > > > > >On 4/12/06, John Chien <[EMAIL PROTECTED]> wrote: > > > > > >>Dear sir: > >> > >>I have a feature that requires me to return query result of a > selection > >>statment in certain amount of successive records every time. > >>This is just like a page. > >> > >>For example: > >> > >>SELECT id, name > >>FROM employee; > >> > >>The selection result of this statement is a list. > >>However, I want to only get 30 records every time. > >>For the first call, I want to get the first 30 (1 - 30) records, for > >>thext call, I would like to get the next 30 (31 - 60) records. > >> > >>How can I do this in Ibatis ? > >> > >>Thanks, > >> > >>John Chien > >> > >> > >> > >> > >> > >
