Oracle SHARED_POOL&BUFFER CACHE

Oracle 10.2 版本..

ALTER SYSTEM  FLUSH BUFFER_CACHE

作用是清除数据库buffer cache中的数据,以下来自官方文档。

The FLUSH BUFFER_CACHE clause lets you clear all data from the buffer cache in the system global area (SGA).
Caution:
This clause is intended for use only on a test database. Do not use this clause on a production database, because as a result of this statement, subsequent queries will have no hits, only misses.
This clause is useful if you need to measure the performance of rewritten queries or a suite of queries from identical starting points.

eygle对此语句的测试:

http://www.eygle.com/archives/2005/12/oracle_howto_flush_buffer_cache.html

---------------------------------------------------------------------------------------------------------------------

ALTER SYSTEM FLUSH SHARED_POOL

The FLUSH SHARED POOL clause lets you clear all data from the shared pool in the system global area (SGA). The shared pool stores

1.Cached data dictionary information

2.Shared SQL and PL/SQL areas for SQL statements, stored procedures, function, packages, and triggers.
This statement does not clear shared SQL and PL/SQL areas for items that are currently being executed. You can use this clause regardless of whether your instance has the database dismounted or mounted, open or closed.

猜你喜欢

转载自yangeoo.iteye.com/blog/1766927