My humble opinion is that you have to pay the price somewhere.  Either you are 
going to load all that data into memory in a List or get it from the database 
for each page.  I use JPersist to map the database to objects. I have found it 
to be quite fast.  Connection pooling helps too.

If you have several users searching and returning large Lists in memory, you 
may not be too happy with those results either :)

-----Original Message-----
From: Dane Laverty [mailto:danelave...@chemeketa.edu]
Sent: Tuesday, January 06, 2009 8:08 PM
To: users@wicket.apache.org
Subject: DataView vs ListView

I've been trying to understand when DataView would come in handy. I have
a SQL database table with about 1,000,000 rows. The user can enter a
search string, and my application returns a list of all the rows that
match the search string. This list might be over 10,000 rows.



At first I thought this would be a perfect situation for a DataView,
since it involves large numbers of rows, and I don't necessarily want to
get all 10,000 rows if the user only needs to look at the first 20.
However, I'm finding that, since DataView re-queries the database with
each page view of the results list, any time advantage I might have
gotten initially is quickly lost. It seems that using a
PageableListView, I just query the database once and I'm good.



So my question is, am I misunderstanding the purpose of the DataView?
All of the online examples I find for DataView use Java databases rather
than SQL relational databases. Is the DataView only useful if you
already have some kind of a Java database to back it up? Or is there
some way that I can take advantage of DataView in this situation without
having to re-query the database whenever the user clicks to a different
page of the result list?

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

EMAIL CONFIDENTIALITY NOTICE 

This Email message, and any attachments, may contain confidential 
patient health information that is legally protected. This information 
is intended only for the use of the individual or entity named above. 
The authorized recipient of this information is prohibited from disclosing 
this information to any other party unless required to do so by law 
or regulation and is required to destroy the information after its stated 
need has been fulfilled. If you are not the intended recipient, you are 
hereby notified that any disclosure, copying, distribution, or action 
taken in reliance on the contents of this message is strictly prohibited. 

If you have received this information in error, please notify 
the sender immediately by replying to this message and delete the 
message from your system.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to