Skip to Main Content
  • Questions
  • Difference between "consistent gets direct" and "physical reads direct"

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Trang.

Asked: November 20, 2017 - 9:57 am UTC

Last updated: November 21, 2017 - 1:02 pm UTC

Version: 11.2.0.4

Viewed 1000+ times

You Asked

Hi Tom/Team,

Could you explain the difference between "consistent gets direct" and "physical reads direct"?

Thanks & Regards

and Connor said...

'physical reads direct' is *all* direct reads, not just those done for a consistent read. eg Here's a simple query

SQL> create table t as select d.* from dba_objects d, ( select 1 from dual connect by level <= 50 ) ;

Table created.

SQL> select max(owner)from t;

MAX(OWNER)
-------------------------------------------------------------------------
XDB

1 row selected.

SQL> @mystat
Enter value for statname: direct

NAME                                                              VALUE
------------------------------------------------------------ ----------
db block gets direct                                                  0
consistent gets direct                                            76350
physical reads direct                                             76350


so they are in alignment. Now I'll do something that needs *other* kinds of direct I/O, eg a large sort

SQL> select max(x)
  2  from ( select row_number() over ( order by OWNER,OBJECT_NAME,SUBOBJECT_NAME,OBJECT_ID ) as x from t );

    MAX(X)
----------
   3937800

1 row selected.

SQL> @mystat
Enter value for statname: direct

NAME                                                              VALUE
------------------------------------------------------------ ----------
db block gets direct                                                  0
consistent gets direct                                            76350
physical reads direct                                            102953

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Trang Le, November 21, 2017 - 2:35 pm UTC

Thank you for your reply!

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database