I think it would depend on how many records you are retrieving and how you are 
retrieving them. For instance, if you are talking about 1000 records or more, a new 
query might be the way to go. Also, using a PreparedStatement would be faster in this 
case than using a Statement.

If I were to research this problem, I would run some tests to see which way was 
fastest. That is going to be the best way to tell which is best anyway. Anything but 
hard test data is speculation.

"Repine, Burt" <[EMAIL PROTECTED]> wrote:

>Hello all -
>
>I have a requirement to retrieve n number of records from a database using
>JDBC and then display those records to the user.
>The user can then sort those records if they so choose.
>Would it be faster/less resource intensive to go back to the database with a
>new 'order by' SQL statement OR sort the records as a Collection in the Java
>code?
>
>Thanks for the help,
>Burt
>
>
>
>To change your membership options, refer to:
>http://www.sys-con.com/java/list.cfm
>


__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to