title: How do I clear oracle execution plan cache for benchmarking?
body: <p>On oracle 10gr2, I have several sql queries that I am comparing performance. But after their first run, the v$sql table has the execution plan stored for caching, so for one of the queries I go from 28 seconds on first run to .5 seconds after.</p>
  <p>I've tried</p>
  <p><code>ALTER SYSTEM FLUSH BUFFER_CACHE;</code></p>
  <p>After running this, the query consistently runs at 5 seconds, which I do not believe is accurate.</p>
  <p>Thought maybe deleting the line item itself from the cache:</p>
  <p><code>delete from v$sql where sql_text like 'select * from....</code></p>
  <p>but I get an error about not being able to delete from view.</p>