This is totally dependent on your implementation.  From what you write, I
gather that your expense is doing the search - therefore querying the search
for every page might be very expensive.  For me, I use Lucene to do the
search, and then only load the exact rows I want, so it is much more
effective to use the DataView rather than ListView, because my biggest
expense is just loading the objects.  (Also, Lucene seems to get quicker
with multiple searches of the same criteria in near succession)


-- 
Jeremy Thomerson
http://www.wickettraining.com

On Tue, Jan 6, 2009 at 7:07 PM, Dane Laverty <danelave...@chemeketa.edu>wrote:

> 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?
>
>

Reply via email to