Consistent gets and db block gets

Hi...
I wanted to know the difference between consistent gets and db block gets in v$sess_io.I have read that consistent gets is the blocks in consistent mode..so here what does consistent mode means????
Thanks in Advance,
Anand

Here's the complete text of the answer I originally wrote nearly 5 years ago on the Oracle-L mailing list:
A 'db block get' is a current mode get. That is, it's the most up-to-date copy of the data in that block, as it is right now, or currently. There can only be one current copy of a block in the buffer cache at any time. Db block gets generally are used when DML changes data in the database. In that case, row-level locks are implicitly taken on the updated rows. There is also at least one well-known case where a select statement does a db block get, and does not take a lock. That is, when it does a full table scan or fast full index scan, Oracle will read the segment header in current mode (multiple times, the number varies based on Oracle version).
A 'consistent get' is when Oracle gets the data in a block which is consistent with a given point in time, or SCN. The consistent get is at the heart of Oracle's read consistency mechanism. When blocks are fetched in order to satisfy a query result set, they are fetched in consistent mode. If no block in the buffer cache is consistent to the correct point in time, Oracle will (attempt to) reconstruct that block using the information in the rollback segments. If it fails to do so, that's when a query errors out with the much dreaded, much feared, and much misunderstood ORA-1555 "snapshot too old".
As to latching, and how it relates, well, consider that the block buffers are in the SGA, which is shared memory. To avoid corruption, latches are used to serialize access to many linked lists and data structures that point to the buffers as well as the buffers themselves. It is safe to say that each consistent get introduces serialization to the system, and by tuning SQL to use more efficient access paths, you can get the same answer to the same query but do less consistent gets. This not only consumes less CPU, it also can significantly reduce latching which reduces serialization and makes your system more scalable.
Well, that turned out longer than I planned. If you're still reading, I hope it helped!
Hope that helps,
-Mark
PS The original question asked about latching as well, which explains the reason for the third paragraph.
Edited by: mbobak on Sep 2, 2008 11:07 PM

Similar Messages

  • I need to change the internal hard drive for my mac book to a 320 gb, 5400 rpm, 2.5" - suggestions of which to get and where to get it?

    I found this: is this the right one?
    Western Digital Scorpio Blue WD3200BPVT 320GB 5400 RPM 8MB Cache SATA 3.0Gb/s 2.5" Internal Notebook Hard Drive Bare Drive

    great thanks--- other than that is this the right thing to get?

  • Reduce Logical IO [db block gets/consistent gets]

    Hi,
    Still I'm unsure about the Logical IO (db block gets + consistent gets).
    I want to reduce 'consistent gets' for this query
    SQL> set autotrace traceonly
    SQL> select * from cm_per_phone_vw;
    905 rows selected.
    Execution Plan
    Plan hash value: 524433310
    | Id  | Operation                    | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |              |   868 | 38192 |     8   (0)| 00:00:01 |
    |   1 |  SORT GROUP BY NOSORT        |              |   868 | 38192 |     8   (0)| 00:00:01 |
    |   2 |   TABLE ACCESS BY INDEX ROWID| CI_PER_PHONE |  1238 | 54472 |     8   (0)| 00:00:01 |
    |   3 |    INDEX FULL SCAN           | CM172C0      |  1238 |       |     1   (0)| 00:00:01 |
    Statistics
              8  recursive calls
              0  db block gets
            922  consistent gets
              4  physical reads
              0  redo size
          39151  bytes sent via SQL*Net to client
           1045  bytes received via SQL*Net from client
             62  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
            905  rows processedFollowing is the view it's accessing
    CREATE OR REPLACE VIEW CM_PER_PHONE_VW
    AS
    SELECT
      per_id
      , MAX(DECODE(TRIM(phone_type_cd), 'MOB', phone)) AS MOB
      , MAX(DECODE(TRIM(phone_type_cd), 'HOME', phone)) AS HOME
      , MAX(DECODE(TRIM(phone_type_cd), 'BUSN', TRIM(phone) || ' ' || TRIM(extension))) AS BUSN
      , MAX(DECODE(TRIM(phone_type_cd), 'FAX', phone)) AS FAX
      , MAX(DECODE(TRIM(phone_type_cd), 'INT', phone)) AS INT
    FROM
      ci_per_phone
    GROUP BY
      per_idI have following indexes on table ci_per_phone
    INDEX_NAME                     COLUMN_NAME                    COLUMN_POSITION
    XM172P0                        PER_ID                                       1
    XM172P0                        SEQ_NUM                                      2
    XM172S1                        PHONE                                        1
    CM172C0                        PER_ID                                       1I tried creating indexes on PER_ID and PHONE_TYPE_CD but the consistent gets reduces to 920 instead of 922.
    Just for curiosity, how can I reduce this?
    secondly, is there any explanation on 'OPERATION' break of the plan, e.g. TABLE ACCESS BY INDEX ROWID ?
    Please advice.
    Luckys.

    Further I'm having problem with another query which is a view
    CREATE OR REPLACE VIEW CM_PER_CHAR_VW
    AS
    SELECT
    /*+ full (a) */
      a.acct_id
      , MAX(DECODE(a.char_type_cd, 'ACCTYPE', a.char_val)) acct_type
      , MAX(DECODE(a.char_type_cd, 'PRVBLCYC', a.adhoc_char_val)) prev_bill_cyc
    FROM
      ci_acct_char a
    WHERE
      a.effdt =
        (SELECT
          MAX(a1.effdt)
        FROM
          ci_acct_char a1
        WHERE a1.acct_id = a.acct_id
        AND a1.char_type_cd = a.char_type_cd)
    GROUP BY
      a.acct_idI'm not able to reduce the consistent gets and even the filter appears.
    I've analyzed the table as well as the index on the table.
    cisadm@CCBDEV> select * from cm_acct_char_vw;
    2649 rows selected.
    Execution Plan
    Plan hash value: 132362271
    | Id  | Operation              | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT       |              |    27 |  4536 |    14   (8)| 00:00:01 |
    |   1 |  HASH GROUP BY         |              |    27 |  4536 |    14   (8)| 00:00:01 |
    |   2 |   VIEW                 |              |    27 |  4536 |    14   (8)| 00:00:01 |
    |*  3 |    FILTER              |              |       |       |            |          |
    |   4 |     HASH GROUP BY      |              |    27 |  2916 |    14   (8)| 00:00:01 |
    |   5 |      NESTED LOOPS      |              |  2686 |   283K|    13   (0)| 00:00:01 |
    |   6 |       TABLE ACCESS FULL| CI_ACCT_CHAR |  2686 |   157K|    12   (0)| 00:00:01 |
    |*  7 |       INDEX RANGE SCAN | XM064P0      |     1 |    48 |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       3 - filter("A"."EFFDT"=MAX("A1"."EFFDT"))
       7 - access("A1"."ACCT_ID"="A"."ACCT_ID" AND
                  "A1"."CHAR_TYPE_CD"="A"."CHAR_TYPE_CD")
    Statistics
              0  recursive calls
              0  db block gets
           2754  consistent gets
              0  physical reads
              0  redo size
          76517  bytes sent via SQL*Net to client
           2321  bytes received via SQL*Net from client
            178  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
           2649  rows processedhere's the tkprof
    select *
    from
    cm_acct_char_vw
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        2      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch      178      0.07       0.05          0       2754          0        2649
    total      181      0.07       0.05          0       2754          0        2649
    Misses in library cache during parse: 1
    Optimizer mode: CHOOSE
    Parsing user id: 63  (CISADM)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: CHOOSE
          0   HASH (GROUP BY)
          0    VIEW
          0     FILTER
          0      HASH (GROUP BY)
          0       NESTED LOOPS
          0        TABLE ACCESS   MODE: ANALYZED (FULL) OF 'CI_ACCT_CHAR'
                       (TABLE)
          0        INDEX   MODE: ANALYZED (RANGE SCAN) OF 'XM064P0'
                       (INDEX (UNIQUE))
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                     179        0.00          0.00
      SQL*Net message from client                   179        0.00          0.08
    ********************************************************************************I've an similar query for another table, where there are 1110 rows, but in the explain, no filter appears in the predicate
    Predicate Information (identified by operation id):
       2 - access("P"."EFFDT"="VW_COL_1" AND "PER_ID"="P"."PER_ID" AND
                  "CHAR_TYPE_CD"="P"."CHAR_TYPE_CD")Both the queries have somewhat similar views.
    I've got 2 questions,
    Is there a way I can reduce the consistent gets( I've tried with/without HINTS),
    secondly whats the predicate access shows as 'VW_COL_1'
    please advice.

  • I was kicked out of my email (rcn) and can't get back in. It happened when I blocked all permissions on an ad in the inbox page. rcn said it's a mozilla issue.

    I had removed a pop up ad from my email inbox page and tried to do the same to another one on the opposite side of the page. I think this ad was not a pop up but part of the inbox page. As I did to the pop up ad, I right clicked on it, and then clicked on 'View Page Info'. I then went to the 'Permissions' window where there were 7 categories, all with the 'use default' option checked. I unchecked all of them and checked 'Blocked' for all 7.
    As soon as I closed the window, I was thrown out of my inbox and was sent back to the log-in page for my email. When I went to log back in, I was unable to. I am stuck on the log-in page and it won't let me access my inbox. I called RCN, my provider, who was able to get in right away. I then used my Internet Explorer browser and was able to get into my email inbox perfectly fine. The 'tech' at rcn said it has something to do with Mozilla and tried to get me to reset it but warned me that I will lose all settings. I am hesitant to do that and I would so appreciate you fine folks at Mozilla to tell me what happened and how to fix it.
    Thank you.

    You can undo your permission changes. Probably the most relevant one is cookies. Try one or both of these methods:
    (1) Page Info > Permissions tab
    While viewing a page on the site:
    * right-click and choose View Page Info > Permissions
    * Alt+t (open the classic Tools menu) > Page Info > Permissions
    (2) about:permissions
    In a new tab, type or paste '''about:permissions''' and press Enter. Allow a few moments for the list on the left to populate, as this information needs to be extracted from a database.
    Then type or paste ''rcn''' in the search box above the list to filter it to the most relevant domains. When you highlight a domain, you can adjust its permissions in the right pane.
    Any luck?

  • I've deleted Adobe Reader 11 and rebooted and reinstalled Adobe Reader 11 and I still get the error message that 'Adobe Reader is blocked because it is out of date'. Using Windows XP with the latest updates (SP3).

    I've deleted Adobe Reader 11 and rebooted and reinstalled Adobe Reader 11 and I still get the error message that 'Adobe Reader is blocked because it is out of date'. Using Windows XP with the latest updates (SP3).

    Screenshots attached to email replies will not make it back to the forum; you need to login to the forum and post it in your topic using the camera icon in the editor.
    Google Chrome is a problem:
    if you use Chrome's own PDF viewer, the results are unpredictable.
    if you use the Adobe Reader plugin with Chrome, it may reject (block) it if it is not the latest version.  Reader 11.0.08 is the latest version for Windows XP, but Chrome may insist on the current version 11.0.10.
    My suggestion; use a different browser!

  • How can I get itunes to download on my PC. I just got an ipod classic for Christmas and can not get Itunes to download. Website goes to downloaded page but i never get a downloading popup. I even turned off my popup blocker.

    How can I get itunes to download on my PC. I just got an ipod classic for Christmas and can not get Itunes to download. Website goes to downloaded page but i never get a downloading popup. I even turned off my popup blocker.

    Make an appointment at the genius bar.
    If you went without an appointment, then it would make sense that you could be turned away.

  • I am trg to open a PDF and I am getting a security warning that says allow cancel or block and then it says it needs a signature to open the document I have never had this problem before it is on a public document I am trying to view any help is apperciat

    I am trying to open a PDF in and I am getting a security warning that says block , close , or allow and then it still will not open then it says it needs a signature it is a public document any help is appreciated thank you in advance sorry this is my first time on here

    I have no idea what you're talking about. Are you sure it want a "signature" and not "password"? If it asks you for password then the document is encrypted and you need to know the password toopen it. The fact that it is a "public" PDF, whatever you mean by "public" does not mean anything. If it is not that then:
    Which product are you using, which version (including minor), which platform (Win/Mac), which OS/version? Please, include screenshots of the alerts, warnings that you get.

  • After uninstalling and downloading the latest Abobe Flash player, I can no lnger play youtube videos. I get the message "blocked plug-in". It works in Firefox, but not Safari.

    After uninstalling and downloading the latest Abobe Flash player, I can no lnger play youtube videos. I get the message "blocked plug-in". It works in Firefox, but not Safari?

    Frostbitblue,
    in Safari’s Preferences, select its Security tab, and make sure that its “Internet plug-ins: Allow Plug-ins” checkbox is checked.

  • I keep getting a grey block in the address bar. it says the flashplayer is blocked and I need to update. I updated and it is still blocked. I also hit enable

    I get a grey block, it says the adobe flash player is blocked and needs upgraded. I have upgraded it and it still says blocked. it wont load the game, I have clicked enable to allow this website to run, but it still don't work. when I load the game on google chrome it loads fine.
    how do i get rid of the grey block?

    If you have the latest version of the Adobe Reader then you can ignore the warning on the plugin check website.
    Sometimes this website gets it wrong. This can especially happen if you are using an older Windows version that doesn't support the latest version of a program.

  • HT5655 I just downloaded the lates version of flash and I am still getting the same Blocked Plug - in message. Any solutions to this issue?

    I just downloaded the lates version of flash and I am still getting the same Blocked Plug - in message. Any solutions to this issue?

    Quit and relaunch Safari and the new version should work.

  • I keep getting the message blocked plug-in.  I have the latest flash player installed and am using Safari version 5.1.10.  Can anyone please provide a simple explanatio and cure????

    I keep getting the message blocked plug-in.  I have the latest flash player installed and am using Safari version 5.1.10.  Can anyone please provide a simple explanatio and cure????

    First paragraph explains...
    Adobe Flash Player updates available for OS X on December 12, 2014 - Apple Support
    Feliz Nuevo Año
    ÇÇÇ

  • Future.get and the event despatch thread blocking

    neeeyaaarghhhh
    been tying myself in knots thinking about this
    Following one of the java tech tips I've been using Callable and Future objects when I want to return a result from a task, in my case it's usually some file processing
    So I have a file chooser gui, I select a file and launch my Callable and await the result in Future.get...
    Now the problem is... Future.get I understand blocks the calling thread until the computation / work in the Callable is done and the result returned. In this case the blocked thread will be the event despatch thread... which causes problems as during my file reading I have a JProgressBar running and updating. Well at least I did, now it doesn't show up at all as all the updates to the JProgressBar via invokeLater are queued (as event despatch thread is blocked) until after the work thread has finished
    How do I launch a Callable, await the result and have some limited gui activity as the task progresses? The only solution I've found is to have the ProgressBar in a modal dialog, to block out the rest of the gui like this whilst I do the work in the event despatch thread (and drop the idea of threading altogether)
    Is my mental modal of how worker threads should spin off from the event thread flawed or am I just missing some 1 line command?

    In the situation of updating the gui, you usually want to pass some sort of callback object to the asynchronous code and have that callback method run on the gui event thread.
    public class GuiClass {
    public void handleResult(Object data);
    public void startTask() {
      threadpool.execute(new Runnable() {
        public void run() {
          // ... do asynch work ...
          final Object myResult = ...;
          SwingUtilities.invokeLater(new Runnable() {
            public void run() {
              handleResult(myResult);
    }In this code, the startTask method is called on the gui thread. it starts some async work on the threadpool. when finished, the asynch task queues the result to be handled back on the gui thread. the handleResult method is called later on the gui thread with the final result. thus, no blocking of the gui thread.
    The Callable interface is great for when the invoking thread needs to wait for a result, but you pretty much never want to do this with the gui thread.

  • I have an iphone 3gs, and i keep getting blocked number calling me (prank calls) im getting really fed up with it all now i have had 12 calls from the same person! i was just wondering if there is any way i could block this caller from calling me?

          i have an iphone 3gs, and i keep getting blocked number calling me (prank calls) im getting really fed up with it all now i have had 12 calls from the same person! i was just wondering if there is any way i could block this caller from calling me?

    Contact your carrier and ask them.

  • Download an upgrade to Adobe Flash to my MAC Book Pro and get a message " Blocked Plu

    As mentioned above I have been trying to download an update to Adobe Flash  onto my MacBookPro, I get a message "Blocked Plug-in" and the update never downloads. I do not understand what the message means or what I need to do to get the download.

    It seems to be a browser specific issue. Try a different browser like chrome or firefox, it should work.
    For fixing IE or Safari, lets follow below suggestions :
    Run the Flash Player Uninstaller as applicable for your machine(i.e.Windows or MAC) and remove flash player.
    For MAC : http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html
    For Windows : http://helpx.adobe.com/flash-player/kb/uninstall-flash-player-windows.html
    Restart the machine.
    Download and Re-install Flash Player.
    Restart the browser and check.
    You might also wanna check the below articles ::
    Enabling Flash Player in Internet Explorer 9 : http://forums.adobe.com/thread/885448
    ActiveX Filtering in Internet Explorer 9 : http://forums.adobe.com/thread/867968

  • Consistent gets and buffer gets

    Hi,
    what is the difference between Consistent gets and buffer gets ?
    Many thanks before.

    plz the documentation is your friend. You can search from tahiti.oracle.com or 10.2 (or your version) docu library.

Maybe you are looking for

  • RSS folders?

    I have several rss feeds in Mail and wanted to know if there was some way to lump same-topic feeds into folders (ie a sports folder for sport rss, tech folder, etc) I am not afraid to tinker with .plists or terminal.

  • Songs stop after the end any solutions ?

    Hi guys, Ok so there is my problem. Itunes suddenly decided to cut some songs before the end of them. It didn't do that before it suddenly happened. I wonder why beacause evertyhting work fine until I upgrade for the new version. Fo exemple, there is

  • Problems installing itunes and quicktime. i've tried everything

    i installed itunes. i was then using the wrong port/plug in because it wouldn't read my D drive. i reinstalled itunes and then i clicked on it and it says something like "i can't open this because the installation failed with itunes or quicktime." i

  • Trial iWork won't install

    My iMac came with a trial of iWork but I have not been able to get it to install. It starts to install & then says "There were errors installing the software" " Please try installing again". I have tried 4 or 5 times with the same result.

  • How can I make Ted work with ibus?

    the title says it all. Relevant: https://bbs.archlinux.org/viewtopic.php?id=78323