Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Query time question
The answer is yes, Oracle does store data from disk in the buffer cache in
the System Global Area (SGA) in memory. This will affect the performance of
the query and I guess will affect the elapsed time reported by TKPROF as a
result. It also stores the parsed version of your query in the shared pool
(also in the SGA) so if you run the same query again, you should save time
on parsing the SQL.
This is an intersting question from the point of view of tuning SQL, and one to which I haven't found an answer yet. That is, when you run a query and trace the result, then tune the query and try again, does Oracle still use data in the cache or does it go back to disk so that the results are comparable? I'm sure it must do something like that because the results do seem to be the same between executions - mostly.
The only way I know of to guarantee that the cache is cleared is to stop and restart the database.
Over to you boffins...
Robin
laulau823_at_my-deja.com wrote in message <86eitq$ah6$1_at_nnrp1.deja.com>...
>Hello all,
>
<snippety snip>
>
> Could anyone tell me why there is time differences between these two
>running? Is data stored in memory when running the SQL file? If yes, how
>can I clear all the data stored in memory before running a SQL
>statement?
>
>Thanks,
>Daivd
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Mon Jan 24 2000 - 10:35:09 CST
![]() |
![]() |