Friday, March 30, 2012

Performance hit for cross-database partitioned view (on same serve

What would be the performance difference for a view spanning multiple tables
in separate filegroups but in the same database as opposed to the same view
spanning tables in different databases (all on the same server).
Since the execution plan is the same, I would think that there is no
difference but some of the tests I have done seem to indicuate a performance
hit of about 10% for the cross-database view.If there are updates, then there are cost related to transaction commit
cross databases.
You might want to use set statistic IO to see more details of the query
execution.
--
Wei Xiao [MSFT]
SQL Server Storage Engine Development
http://blogs.msdn.com/weix
This posting is provided "AS IS" with no warranties, and confers no rights.
"DBA72" <DBA72@.discussions.microsoft.com> wrote in message
news:C764B4BA-4C3E-41B4-BC41-E85A894255EC@.microsoft.com...
> What would be the performance difference for a view spanning multiple
tables
> in separate filegroups but in the same database as opposed to the same
view
> spanning tables in different databases (all on the same server).
> Since the execution plan is the same, I would think that there is no
> difference but some of the tests I have done seem to indicuate a
performance
> hit of about 10% for the cross-database view.|||If the databases are on the same server and running under the same instance
of SQL Server then the difference should be very small. Running under
different instances (even on the same server) requires cross-process
marshalling and incurrs a performance impact.
"DBA72" wrote:

> What would be the performance difference for a view spanning multiple tabl
es
> in separate filegroups but in the same database as opposed to the same vie
w
> spanning tables in different databases (all on the same server).
> Since the execution plan is the same, I would think that there is no
> difference but some of the tests I have done seem to indicuate a performan
ce
> hit of about 10% for the cross-database view.

No comments:

Post a Comment