|
Posted by David Portas on 01/31/06 11:58
Beowulf wrote:
> Unfortunately, I have a large number of views that need to be joined
> with physical tables and other views. As far as I know (entirely
> possible I'm wrong), my options are views or user-defined functions that
> return tables.
Yes but in that case it would make no sense to use an "ordered" view
even if such a thing were possible. Forcing SQL Server to order the
data before you join it in a query might restrict the server from
utilizing a better query plan that implied a different ordering. This
is exactly why the optimizer is and should be free to ignore sorts in
views.
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--
Navigation:
[Reply to this message]
|