From: Chris on
I have a weird issue. I have a job that will rebuild the indexes if
fragmentation is over 30 percent. If it is under 30 percent it will
reorganize.

I have a perflog from last night indicating that there was an alter
index, and the command was insert table1 select * from table1.

Is it possible that the reorg or the rebuild would run this behind the
scenes? If so, why would it do that?
From: Tibor Karaszi on
> Is it possible that the reorg or the rebuild would run this behind the
> scenes? If so, why would it do that?

Under the covers, an index rebuild is creating a new index, and then
removing the old index. This is represented in a PRofiler trace the way you
mentioned.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi



"Chris" <chris.mccrain(a)henryschein.com> wrote in message
news:acf1992a-5ab1-44a2-b0cf-3d63fca4fa17(a)t41g2000yqt.googlegroups.com...
> I have a weird issue. I have a job that will rebuild the indexes if
> fragmentation is over 30 percent. If it is under 30 percent it will
> reorganize.
>
> I have a perflog from last night indicating that there was an alter
> index, and the command was insert table1 select * from table1.
>
> Is it possible that the reorg or the rebuild would run this behind the
> scenes? If so, why would it do that?