2011. 3. 30. 10:07

Admin::Cache Flush 가 발생하는 경우


You may experience a decrease in query performance after you perform certain database maintenance operations or regular transaction operations in SQL Server 2005

( http://support.microsoft.com/kb/917828 )

 

2006-10-15 06:03:29.330 spid59 SQL Server has encountered 4 occurrence(s) of cachestore flush for the 'Object Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
2006-10-15 06:03:29.420 spid59 SQL Server has encountered 4 occurrence(s) of cachestore flush for the 'SQL Plans' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.
2006-10-15 06:03:29.420 spid59 SQL Server has encountered 4 occurrence(s) of cachestore flush for the 'Bound Trees' cachestore (part of plan cache) due to some database maintenance or reconfigure operations.

 

 

The whole procedure cache is cleared when certain database level operations are performed in the following scenarios:

·         A database has the AUTO_CLOSE database option set to ON. When no user connection references or uses the database, the background task tries to close and shut down the database automatically.

·         You run several queries against a database that has default options. Then, the database is dropped.

·         A database snapshot for a source database is dropped.

Note Database snapshots are only available in Microsoft SQL Server 2005 Enterprise Edition.

·         You change the database state to OFFLINE or ONLINE.

·         You successfully rebuild the transaction log for a database.

·         You restore a database backup.

·         You run the DBCC CHECKDB statement.

Note This is true only in versions of SQL Server 2005 that are earlier than SQL Server 2005 SP2. After you install SQL Server 2005 SP2 or later versions, the whole procedure cache is not flushed when you run the DBCC CHECKDB statement.

·         You detach a database.

·         You specify one of the following options when you run the ALTER DATABASE statement:

o    OFFLINE

o    ONLINE

o    MODIFY FILEGROUP DEFAULT

o    MODIFY_NAME

o    MODIFY FILEGROUP READ_WRITE

o    COLLATE

o    MODIFY FILEGROUP READ_ONLY

o    READ_ONLY

o    READ_WRITE

·         The whole procedure cache is cleared if one of the following server options is changed by the RECONFIGURE statement:

o    cross db ownership chaining

o    index create memory (KB)

o    remote query timeout (s)

o    user options

o    max text repl size (B)

o    cost threshold for parallelism

o    max degree of parallelism

o    min memory per query (KB)

o    query wait (s)

o    min server memory (MB)

o    max server memory (MB)

o    query governor cost limit

Note Procedure cache will not be cleared if the actual value does not change or if the new value for the max server memory server option is set to 0.