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