You've overloaded my sarcasm meter! Darn it, now I have to go buy a new one.
On Wed, Nov 26, 2008 at 11:58 AM, Igor Vaynberg <[EMAIL PROTECTED]>wrote: > On Wed, Nov 26, 2008 at 7:32 AM, Wayne Pope > <[EMAIL PROTECTED]> wrote: > > I'm sure I must be missing something still, as I can't beleive that we > need > > to either a) load the whole data set > > what? why would you ever load the whole dataset? > > b) call count on the Db , then load in > > the iterator mehod. Thats going to kill the database in prod (or really > not > > help.) > > yeah. because select count() queries are the most expensive queries > you can run on the database. you are right, its totally going to kill > it. you know how all those sites on the internet that have a pager > above the pageable view that shows you the number of the last > available page...you know how those work without doing a select > count()? > > -igor > > > > > > > > > > On Wed, Nov 26, 2008 at 3:58 PM, Michael Sparer <[EMAIL PROTECTED] > >wrote: > > > >> > >> have a look at https://issues.apache.org/jira/browse/WICKET-1784 > >> > >> > >> Wayne Pope-2 wrote: > >> > > >> > Ok, > >> > > >> > I was just having a bit of code clean up and I realized that in our > >> > IDataProviders we are loading all rows for a given dataset. > >> > So looking at the iterator method I see we can limit the result (and > the > >> > offset). Great I thought - however I see that that the size() method > is > >> > called as part of the getViewSize() in the AbstractPageableView. Thus > I > >> > need > >> > to call the database here to figure out the size. > >> > > >> > Am I doing sonething wrong or have I got to hit the database twice for > >> > each > >> > DataProvider render. > >> > > >> > Obvously I don't want to hard code a size. Is there any other way ? > >> > > >> > Thanks > >> > Wayne > >> > > >> > > >> > >> > >> ----- > >> Michael Sparer > >> http://talk-on-tech.blogspot.com > >> -- > >> View this message in context: > >> > http://www.nabble.com/Is-there-any-other-way--DataProviders-must-hit-the-Db-twice-for-%28possible%29-large-datasets-tp20701684p20702476.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
