Sort performance framework Vs database

iamroshen

New member
Joined
Feb 27, 2008
Messages
1
Programming Experience
3-5
Hi all,
I am having a small but urgent doubt.
I am using VS.Net 2003 version 1.1
I am having a SELECT query without an order by clause.

If i want to sort datas i have two options:
1) Include an ORDER BY clause in the QUERY
2) Fill the data to a data table and use the <data table>.defaultview.rowfilter

Which method will be more performance optimised, framework sort or DB sort ?

Please explain the above case for the table having an Index and having no index.

Regards,
Roshen.B.Chackalayil
 
Index wont make the slightest bit of difference to the ordering

IMHO ordering is a presentation aspect and the job of the client. The server may be more powerful though if it is in use by multiple people, having it spending lots of time ordering rows is a waste..

I vote client
 
If the server is powerful enough to have the time to return results in the specified order, I would have the results coming in, in the correct order.

But if the server's used by a lot of people constantly (or you don't know how busy the server is) then you should have the sorting be done on the client, especially if the program manipulates the data before displaying it.
 
Back
Top