I decided to create an index on an existing table with a million rows.
I give a simple command like "create index idx_mytable_myfield on mytable(myfield);"
It so happens I have profiler running on that system with rpc completed and SP statement completed events, and TSQL batch completed event.
I see my create statement go by as a batch completed, fine.
But above it I see it also caused an SP statement completed event that says:
"insert [dbo].[mytable] select * from [dbo].[mytable] option (maxdop 1)"
Hey I didn't even know I was calling an SP, but looking at that syntax it claims to have executed ... huh?
Thanks,
Josh