Discussion:
Indexed views
(too old to reply)
Kirby Grant
2013-08-05 18:38:14 UTC
Permalink
When an indexed view is created, the data for the view is instantiated so
that an index can be created. But how much of that data is actually
instantiated? Every column or just the columns upon which indexes are
created?
Erland Sommarskog
2013-08-05 19:35:35 UTC
Permalink
Post by Kirby Grant
When an indexed view is created, the data for the view is instantiated so
that an index can be created. But how much of that data is actually
instantiated? Every column or just the columns upon which indexes are
created?
It's a clustered index. Thus the entire view is materialised.
--
Erland Sommarskog, Stockholm, ***@sommarskog.se
Kirby Grant
2013-08-05 20:32:47 UTC
Permalink
Post by Erland Sommarskog
Post by Kirby Grant
When an indexed view is created, the data for the view is instantiated so
that an index can be created. But how much of that data is actually
instantiated? Every column or just the columns upon which indexes are
created?
It's a clustered index. Thus the entire view is materialised.
So then that must mean that when a row is inserted in the original table, it
is immediately replicated to the indexed view as well.
Erland Sommarskog
2013-08-05 21:58:47 UTC
Permalink
Post by Kirby Grant
So then that must mean that when a row is inserted in the original
table, it is immediately replicated to the indexed view as well.
Yes, atomically as part of the statement. Can be expensive.
--
Erland Sommarskog, Stockholm, ***@sommarskog.se
Continue reading on narkive:
Loading...