I'm doing an INSERT INTO...SELECT statement and even though both tables are indexed like they should I get a freakishly long execution plan! What's going on here? Is this normal?? ->Insert-->INSERT INTO sometable (UserID, MarketID, CompID)SELECT @UserID, MarketID, CompIDFROM someothertable WITH (NOLOCK) WHERE MarketID = @MarketID--> Indexessometable : UserID, MarketID, CompID - clusteredsomeothertable: MarketID, TableID, CompID--> Execution plan|--Assert(WHERE:(If (NOT([Pass1019]) AND ([Expr1018] IS NULL)) then 0... |--Nested Loops(Left Semi Join, WHERE:... |--Nested Loops(Left Semi Join, WHERE:... | |--Nested Loops(Left Semi Join, WHERE:... | | |--Clustered Index Insert(OBJECT:... | | | |--Top(ROWCOUNT est 0) | | | |--Compute Scalar(DEFINE:([Expr1003]=getidentity(988634665, 7, NULL))) | | | |--Clustered Index Seek(OBJECT:... | | |--Row Count Spool | | |--Clustered Index Seek(OBJECT:... | |--Row Count Spool | |--Clustered Index Seek(OBJECT:... |--Row Count Spool |--Index Seek(OBJECT:...
--Lumbago"Real programmers don't document, if it was hard to write it should be hard to understand"