When I'm inserting into a table that has a view with a clustered index, the estimated execution plan appears to do the table insert and the view's clustered index insert operations in parallel.
- Is this true?
- Why do the %s not add up to 100%?
Below is somewhat of a contrived example.
/*
DROP INDEX [IX__AView] ON [dbo].[_AView]
DROP VIEW _AView
DROP TABLE _A
*/
CREATE TABLE _A (Name VARCHAR(10) NOT NULL)
GO
CREATE VIEW _AView WITH SCHEMABINDING AS
SELECT Name FROM [dbo]._A
GO
CREATE UNIQUE CLUSTERED INDEX [IX__AView] ON [dbo].[_AView] ([Name] ASC)
GO
/*
--run the estimated execution on this
INSERT INTO _A (Name) values ('cheese')
*/