From: ronnie on
I am testing some query execution times on a database. I have six queries and
executed them 2 times to get the execution times. Then I execute the ALTER
INDEX ALL ... REBUILD for all the indexes and REBUILD the catalogs (full text
search). In the third pass at all the queries, the execution time increased,
however, in the subsequent passes the execution was again comparable to the
1st and second passes.

Why did the execution time increase after the indexes were rebuilt?

I pass II pass III pass IV pass V pass
(index rebuilt)
5 sec 6 sec 15 sec 5 sec 6 sec
From: Tibor Karaszi on
Perhaps you didn't have the "right" data in cache because of the index
rebuilds?

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



"ronnie" <ronnie(a)discussions.microsoft.com> wrote in message
news:06E7F54C-CCDE-45FD-8416-C1277606E67D(a)microsoft.com...
> I am testing some query execution times on a database. I have six queries
> and
> executed them 2 times to get the execution times. Then I execute the ALTER
> INDEX ALL ... REBUILD for all the indexes and REBUILD the catalogs (full
> text
> search). In the third pass at all the queries, the execution time
> increased,
> however, in the subsequent passes the execution was again comparable to
> the
> 1st and second passes.
>
> Why did the execution time increase after the indexes were rebuilt?
>
> I pass II pass III pass IV pass V pass
> (index rebuilt)
> 5 sec 6 sec 15 sec 5 sec 6 sec