September 25, 2008 at 9:54 am
Hi all,
I'm trying to improve performance of my application. I created indexed view from 9 tables and now instead of joining this tables I'm using this view.Why sometimes in Execution plan I can see that query is getting results from this tables and sometimes from the view?
If query from view is faster then query from tables?
September 26, 2008 at 11:55 am
It depends on the indexed view, the query against it, and the indexes on the base tables in it. Sometimes SQL Server will use the view because that's the fastest, sometimes it will use the tables where it thinks that will be faster. It really can vary quite a lot.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply