Jim, I think his comment was that he did not want to go back to the DB.  But, 
yes I agree. In SQL Server 2005 it is a little trickier. You have to open up a 
selectMethod=cursor at connection time. In SQL Server selectMethod=direct is 
the default :(   After converting from MySql to SQL Server it took me a lot of 
research to find this one!

-----Original Message-----
From: Jim Pinkham [mailto:[email protected]]
Sent: Wednesday, January 07, 2009 10:07 AM
To: [email protected]
Subject: Re: DataView vs ListView

Also, in MySQL syntax, you've got stuff like this that gets you right to the
page you want:

     sql = "Select ... whatever ..";
     sql += " limit " + query.getFrom() + ","+query.getCount();
Oracle and other variants have similar options - I agree conn pool probably
makes most difference.

-- Jim
On Wed, Jan 7, 2009 at 9:52 AM, Ames, Tim <[email protected]> wrote:

> 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:[email protected]]
> Sent: Tuesday, January 06, 2009 8:08 PM
> To: [email protected]
> 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: [email protected]
> For additional commands, e-mail: [email protected]
>
>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to