Clearing Blocks from Memory [message #165705] |
Fri, 31 March 2006 14:14 |
scottwmackey
Messages: 515 Registered: March 2005
|
Senior Member |
|
|
Let's say I run the following query:
SELECT col1
FROM t
WHERE group = 1
Let's say that the table has several million rows and the count for the query returns 20K. The first time I run it, it returns in about 3 seconds. The second time and every time after that, it returns in about 0.5 second. I know that that is because the data blocks have already been read into memory (is it the SGA?) so that subsequent queries do not have to do disk I/O. If I wait a while for other people to perform queries and push these out of memory, my query will take 3 seconds again to retrieve 20K rows. So my question is, Is there are way to clear out the memory to see how long a query would take to perform "fresh"?
ALTER SYSTEM FLUSH SHARED_POOL doesn't seem to have an effect. We need to verify that the query will be under 3 seconds and the vast majority of the query where clauses will be run once and only once so we will not benefit from the block being stored in memory.
|
|
|
|
|
|
|