August 28, 2014 at 9:59 am
Hi,
Unlike in Oracle we don't option to set update frequency for MViews in SQL SErver, so just curious how it works in there.
I have MView (aka Indexed view with schemabinding) with 1M rows, and this morning at 9am got .5 million load of new rows in underlying tables.
Will I have 1.5 million if I do select at 9.05 am? Who controls that refresh, or upon first Select it still do sync?
Thanks
Mario
August 28, 2014 at 11:42 am
It's updated as part of the transaction which modified the base tables.
You'll have 1.5 million if you query one microsecond after the commit for the insert into the base table.
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
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy