Oracle Database Buffer Cache Explained.

Поділитися
Вставка
  • Опубліковано 28 січ 2025

КОМЕНТАРІ •

  • @SAHIL-qw4uh
    @SAHIL-qw4uh 8 місяців тому

    i am from kolkata.i recently started oracledba course.but i fully confused lots of matter about career and roadmap. please sir help me

  • @balajichandramohan5117
    @balajichandramohan5117 9 місяців тому

    Hi there, During the cache miss, how the server process is invoked and writes the block from datafiles to the DB buffer cache.

    • @anishkumarvideos
      @anishkumarvideos  7 місяців тому

      Please check out the flow :
      asrblogger.com/how-insert-statement-get-executed-in-oracle/

    • @anishkumarvideos
      @anishkumarvideos  7 місяців тому

      1. Cache Miss Detection:
      The server process detects that the required data block is not in the Database Buffer Cache.
      2. Search for Free Buffer:
      The server process searches for a free buffer in the Database Buffer Cache where the new data block can be loaded.
      If a free buffer is not available, it may need to replace an existing buffer, following the Least Recently Used (LRU) algorithm.
      3. Buffer Replacement (if necessary):
      If the buffer chosen for replacement contains dirty data (modified but not yet written to disk), the server process initiates a write operation to flush the dirty buffer to the datafiles using the Database Writer (DBWn) process.
      4. Read Data Block from Disk:
      The server process issues an I/O request to read the data block from the appropriate datafile. This request is sent to the operating system, which then reads the block from the storage system.
      5. Load Block into Buffer Cache:
      Once the data block is read from disk, it is loaded into the free or replaced buffer in the Database Buffer Cache.
      6. Mark Buffer as Pinned:
      The server process marks the buffer as pinned to indicate that it is currently being used, preventing other processes from replacing it while it is in use.
      7. Return Data to User:
      The server process accesses the required data from the newly loaded block in the Database Buffer Cache and returns the data to the user or application.
      8. Unpin the Buffer:
      After the data is accessed, the server process unpins the buffer, making it available for other processes to use.
      Hope it helped !! :)