DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Interview Qn on Insert

  1. #1
    Join Date
    Oct 2000
    Posts
    449
    Hi DBA's
    Can anyone of you tell me, how is an insert handled when inserted and then comitted. How does Oracle use the DBC, RLB and RBS.. With a select and update statement I know the process pretty much on the background.
    This was asked in an interview...
    Thx..

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    First of all, I hope I undertand your acronims correctly. I assume:

    DBC - databuffer cache
    RLB - redolog buffer
    RBS rollback segment

    If I'm not mistaken it goes something like this:

    1. System finds first block on the free list, that is used block with sufficient free space for new inserts and user process reads it into buffer cache (if it is not allready there)
    2. Inserts new record into that block in the cache. This block will be written to database file eventually, at least during next checkpoint if not before.
    3. In the same time the correspondingredo entry will be written into redo log buffer. This will eventually be written to redolog file, at least at the first commit or log switch, if not before.
    4. In the same time a coresponding undo entry of this block is written into rollback segment and this block is "locked" in the rollbac extent so it will not be overwritten by other transactions.
    5. When transaction is commited, the redo entry from redolog buffer is written to redolog file (if it was not allready written before that). At the same time the "lock" on the block is released from the rollback segment.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3
    Join Date
    Oct 2000
    Posts
    449
    Thanks buddy..
    You were right about the acronyms.. Great Info.

  4. #4
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    st2000,

    You would have got some light on your Q little earlier if you would have not used acronyms but exact words. Use acronyms for most popular terminology like RBS etc., not for everything... Otherwise you endup waiting...waiting and waiting...

    Just a reminder, next time when you post a Question.

    Hates off Jmodic !! Right picks for acronyms in first attempt itself!


    [Edited by sreddy on 01-18-2001 at 09:10 PM]

  5. #5
    Join Date
    Oct 2000
    Posts
    449
    Suggestion makes sense sreddy.. I can see how unpopular they are now..
    If any of you guys can, can you also mention about Updates and Selects how they are processed. How unsimilar is it to the Inserts? Thx.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width