Let's say I've got a SQL Server Indexed View, vwIndexedView, that reads from two tables, tbTableOne, and tbTableTwo.
If I perform an action on one of the two tables inside a transaction, what happens to my indexed view? Is it refreshed immediately, or do I have to commit my transaction before the results will feed into it?
For instance:
BEGIN TRANSACTION testTransaction
INSERT INTO tbTableOne VALUES ('1', '2')
SELECT * FROM vwIndexedView
COMMIT TRANSACTION
SELECT * FROM vwIndexedView
Would the results of the first SELECT be different than the second?