> In my experience, that's not correct.

        so, if I have a view, CustomersView
SELECT * FROM Customers

        and I have 2 queries:
A:
SELECT * FROM CustomersView
WHERE Country='USA'

B:
SELECT * FROM (SELECT * FROM Customers) CustomersView
WHERE CustomersView.Country = 'USA'

        You're saying A is slower than B?

        Check the execution plans. Most modern RDBMS's will merge the SQL of 
the view into the query first, then calculate the
execution plan and then execute it. So a view is more or less just a code 
snippet.

        It will be different with indexed views which are stored results and 
act as tables, there the view usage is much faster, as
the query of the view is bypassed as the results are used directly

                FB


>
> -----Original Message-----
> From: Discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED] On Behalf Of Frans Bouma
> Sent: Friday, 11 August 2006 19:13
> To: [email protected]
> Subject: Re: [ADVANCED-DOTNET] SQL Server 2005 Xml question...
>
>
>         A view is just a query, so a query utilizing a view
> isn't going to be slower than a query with the view's sql inside it.
>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
>

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to