How to check configured sql oracle and how to clear transparent system / hardware buffer?

I want to know how to test the correct sqls before tuning and after tuning. but as soon as I executed the original sql, I got too fast results for the configured sql.

I found below ...

How to clear all cached items in Oracle

I flushed the data buffer cache and shared pool, but it still didn't work. I think this answer from this question is related to what I want to know more: Keep in mind that the operating system and hardware also cache, which can distort the results.

Oracle is 11g and the server is HP-UX 11.31.

If the server was Linux, I could try flushing the buffer using "/ proc / sys / vm / drop_caches". (I'm not sure if this will work)

I have been looking for quite a while for this problem. Does anyone have such a problem?

thank

+4
source share
1 answer

If your request is such that the results are cached on the file system, which your description may suggest, then the request is probably not a "heavy hit" in general. But if you tested in isolation, with little activity in the database, when SQL runs in a production environment, performance may suffer.

There are a few things you can do to determine which version of the two queries is better. In fact, entire books have been written specifically on this topic. But to summarize:

Before you begin, make sure the statistics for tables and indexes are up to date.

  • , SQL . 2 , , .
  • explain plan .
  • , .
0

All Articles