SQL Server Indexing
        Posted  
        
            by durilai
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by durilai
        
        
        
        Published on 2010-04-27T21:00:08Z
        Indexed on 
            2010/04/27
            21:03 UTC
        
        
        Read the original article
        Hit count: 474
        
I am trying to understand what is going on with CREATE INDEX internally. When I create a NONCLUSTERED index it shows as an INSERT in the execution plan as well as when I get the query test. 
DECLARE @sqltext VARBINARY(128)
SELECT @sqltext = sql_handle
FROM sys.sysprocesses s
WHERE spid = 73 --73 is the process creating the index
SELECT TEXT
FROM sys.dm_exec_sql_text(@sqltext)
GO
Show:
insert [dbo].[tbl] select * from [dbo].[tbl] option (maxdop 1)
This is consistent in the execution plan. Any info is appreciated.
© Stack Overflow or respective owner