Reputation: 186
I would like to test performance of query, but the problem is that database is using cached memory, so the result are not reliable.
How can i turn off caching/clear cache memory(and do not impact other users significant) ?
I am using Oracle 11.2 database.
Upvotes: 1
Views: 6465
Reputation: 2044
DON'T do this on your production server, but
You can do the following :
alter system flush shared_pool
alter system flush buffer_cache
This will flush the library cache and the buffer pool.
Note: this isn't going to give you 'real world' situations as there will normally be some data in memory when running on a production server but it will show you what its like with a 'fresh' database
Upvotes: 3
Reputation: 2496
Caching isn't a problem, it's a feauture. If you wish to get useful results, you should test the query using real database state, with caching among others. If you test 'without caching', you'll get a value which will never happened in production (except maybe very rare case immediately after database restart).
Upvotes: 1