Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle cache

Re: Oracle cache

From: Walter T Rejuney <BlueSax_at_Unforgetable.com>
Date: Thu, 21 Dec 2000 10:30:35 -0500
Message-ID: <3A42221B.874D5B56@Unforgetable.com>

"John L. Laine" wrote:

>
>
> Walter T Rejuney wrote:
>
>> When a DML which performs an insert occurs, the engine will parse
>> the
>> statement and then build the row for insertion into the logical
>> table
>> located within the physical tablespace. So far so good.
>>
>> Question: If a query for that same row occurs almost immediately
>> afterwards will Oracle physically read the table to get the values
>> or
>> will it recognize that the values are already in memory and pass the
>>
>> memory contents back to the caller?
>
> If you do a INSERT and then SELECT, your update is Probably still in
> the Buffer Pool, and since it is the same session, your select will
> see the new row and retrieve it from the buffer pool.
> This gives you a chance to examine the results of your
> INSERT/UPDATE/DELETE statement, and if you change your mind, you can
> then execute a ROLLBACK.
> Other sessions connected to the database, will not see the change
> until you COMMIT.
>
> The buffer pool is dynamically managed, so it depends upon how much
> other activity is hitting it, and what the settings are, as to how
> long a datum is retained in it.

The SELECT would be performed by a session that is not the same one as the session that performed the insert (and commit). Would that make a difference? Would it still get the row from cache instead of from a physical read as long as the information hasn't aged out of cache? Received on Thu Dec 21 2000 - 09:30:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US