January 15, 2010 at 6:03 am
If i create a view on 5 tables by innerjoin & then use this view in sp's
or
use the 5 table inner joines directly in sp's,
which one will be faster?
January 15, 2010 at 6:18 am
the performance will probaly be the same unless you are using an index view
It is fairly easy to test
January 15, 2010 at 7:04 am
They'll be identical.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 15, 2010 at 7:45 am
It also depends on wether or not you plan on using the view in other procedures. If so, creating the view would make reuse of the select statment easier.
January 15, 2010 at 7:49 pm
Nitin Kumar Varshney (1/15/2010)
If i create a view on 5 tables by innerjoin & then use this view in sp'sor
use the 5 table inner joines directly in sp's,
which one will be faster?
It depends... are you using any criteria on aggregates that are created by the view? If there are no aggregates in the view, then the others are correct... no difference.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply