Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Views:top with order

Author  Topic 

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2002-11-13 : 12:57:51
I have a view,
it pulls data from two tables.

Which is better for performance?
Using Top with an order by
or
leaving it unordered.

The two most common fields used to grab data from
the view were what I ordered the records in the view on.

Is there a difference?
Thanks for any insight.

_________________________
Beer is healthy, I read it on the internet. It must be true!

M.E.
Aged Yak Warrior

539 Posts

Posted - 2002-11-13 : 13:01:45
I would have to say neither on this one. The data in views aren't physically stored anywhere. If you are looking for a method to increase query preformance look up info on indexed views (MSSQL 2000).

-----------------------
SQL isn't just a hobby, It's an addiction
Go to Top of Page

Vivaldi
Constraint Violating Yak Guru

298 Posts

Posted - 2002-11-13 : 13:13:38
I wasn't sure if any caching
of the view
would help with the ordering.

Danke Schoen

_________________________
Beer is healthy, I read it on the internet. It must be true!
Go to Top of Page
   

- Advertisement -