Monday, March 12, 2012

Reindexing has different behaviour in 2005

I noticed that when I use Maintenace plan wizard to create maintenance plan
to reindex a database, it runs different than it did on SQL2000.
On SQL2000, the job was running about 15 minutes on my 10GB database. During
that time there was a lot of disk activity (loging) and CPU was around 30%.
Now on SQL2005 if I run reindexing maintenance plan on the same 10 GB
database, it first utilizes CPU to maximum (one thread on hyper-threaded
CPU - 3.4GHz Xeon) and during that time there is no disk activity at all.
Profiler tells me that it selects data about database schema. That runs
about 30 minutes and after that actual reindexing begins that also couses a
lot of disk activity and lasts about 15 minutes (same as on SQL2000).
I'm a bit confused about that first 30 minutes when only CPU is doing all
the work. That part was not there in SQL2000. If it takes 30 minutes on 10GB
database, what will happen on 100GB or larger databases? Has anyone some
info if that behaviour has changed in SQL2005?
TomCan you tell us what command(s) the mp is running? You should be able to
script it out.
"Tom" wrote:

> I noticed that when I use Maintenace plan wizard to create maintenance pla
n
> to reindex a database, it runs different than it did on SQL2000.
> On SQL2000, the job was running about 15 minutes on my 10GB database. Duri
ng
> that time there was a lot of disk activity (loging) and CPU was around 30%
.
> Now on SQL2005 if I run reindexing maintenance plan on the same 10 GB
> database, it first utilizes CPU to maximum (one thread on hyper-threaded
> CPU - 3.4GHz Xeon) and during that time there is no disk activity at all.
> Profiler tells me that it selects data about database schema. That runs
> about 30 minutes and after that actual reindexing begins that also couses
a
> lot of disk activity and lasts about 15 minutes (same as on SQL2000).
> I'm a bit confused about that first 30 minutes when only CPU is doing all
> the work. That part was not there in SQL2000. If it takes 30 minutes on 10
GB
> database, what will happen on 100GB or larger databases? Has anyone some
> info if that behaviour has changed in SQL2005?
> Tom
>
>

No comments:

Post a Comment