Académique Documents
Professionnel Documents
Culture Documents
After presenting Exadata Storage Indexes: Inside and Out at the 2013 Hotsos
Symposium, one of the presentation attendees posed a question about how
Storage Indexes are used in situations when uncommitted updates happen on
tables that have subsequent Smart Scan queries executed against them. In other
words, will Storage Indexes be used in situations when consistent reads require
block access vs. a 100% cell offload scenario. In this post I'll show some
examples that hopefully illustrate this behavior.
First, the details of the test environment:
Exadata X2-2 Quarter Rack
Oracle RDBMS version 11.2.0.3 with the J anuary 2013 QFSDP patches
applied against it
Storage Server image version 11.2.3.2.1.130109
I used a simple test table, MYOBJ _TEST4, a 20+million row tables consisting of 10
columns with data ordered by a column called COL1. COL1 is a numeric data type
with 1,000 distinct values ranging from 1 to 1,000:
SQL> sel ect col umn_name, num_di st i nct
2 f r omdba_t ab_col umns
3 wher e t abl e_name=' MYOBJ _TEST4' and col umn_name=' COL1' ;
COLUMN_NAME NUM_DI STI NCT
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COL1 1000
El apsed: 00: 00: 00. 14
SQL> sel ect num_r ows f r omdba_t abl es wher e t abl e_name=' MYOBJ _TEST4' ;
NUM_ROWS
- - - - - - - - - -
20447000
El apsed: 00: 00: 00. 02
SQL>
DML, Consistent Reads, and
Storage Indexes on Exadata
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 1 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
against this table with a narrow range predicate on COL1:
SESS1 SQL> SELECT count ( col 1)
2 FROM d14. myobj _t est 4
3 wher e col 1 bet ween 1 and 10;
COUNT( COL1)
- - - - - - - - - - -
204470
El apsed: 00: 00: 00. 09
SESS1 SQL> @si _myst at . sql
SESS1 SQL> set echo of f
SESS1 SQL> sel ect st at . name,
2 sess. val ue val ue
3 f r om v$myst at sess,
4 v$st at name st at
5 wher e st at . st at i st i c# = sess. st at i st i c#
6 and st at . name i n
7 ( ' cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad' ,
8 ' cel l physi cal I O i nt er connect byt es' ,
9 ' cel l physi cal I O byt es saved by st or age i ndex' ,
10 ' cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan
' ,
11 ' consi st ent get s' , ' db bl ock get s' ,
12 ' physi cal r eads' , ' physi cal r eads di r ect ' )
13 or der by 1
14 /
St at i st i c Val ue
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad 1, 805, 15
6, 352
cel l physi cal I O byt es saved by st or age i ndex 1, 786, 64
2, 432
cel l physi cal I O i nt er connect byt es 2, 496, 62
4
cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan 2, 488, 43
2
consi st ent get s 220, 365
db bl ock get s 0
physi cal r eads 220, 357
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 2 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
and we saved nearly all of this (1,786,642,432 bytes) with Storage Indexes.
Additionally, 2,496,624 bytes were transmitted over the storage interconnect.
For our first test, we'll update these rows, commit, and checkpoint:
SESS2 SQL> updat e d14. myobj _t est 4
2 set col 1=col 1
3 wher e col 1 bet ween 1 and 10;
204470 r ows updat ed.
El apsed: 00: 00: 18. 73
SESS2 SQL> commi t ;
Commi t compl et e.
El apsed: 00: 00: 00. 00
SESS2 SQL> al t er syst emswi t ch l ogf i l e;
Syst emal t er ed.
El apsed: 00: 00: 00. 03
SESS2 SQL> al t er syst emcheckpoi nt ;
Syst emal t er ed.
El apsed: 00: 00: 00. 13
SESS2 SQL>
If we now re-run our test query in a different session, the statistics look like below:
SESS1 SQL> SELECT count ( col 1)
2 FROM d14. myobj _t est 4
3 wher e col 1 bet ween 1 and 10;
COUNT( COL1)
- - - - - - - - - - -
204470
El apsed: 00: 00: 00. 08
SESS1 SQL> @si _myst at . sql
SESS1 SQL> set echo of f
SESS1 SQL> sel ect st at . name,
2 sess. val ue val ue
3 f r om v$myst at sess,
4 v$st at name st at
5 wher e st at . st at i st i c# = sess. st at i st i c#
6 and st at . name i n
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 3 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
7 ( ' cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad' ,
8 ' cel l physi cal I O i nt er connect byt es' ,
10 ' cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan
' ,
11 ' consi st ent get s' , ' db bl ock get s' ,
12 ' physi cal r eads' , ' physi cal r eads di r ect ' )
13 or der by 1
14 /
St at i st i c Val ue
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad 1, 805, 156,
352
cel l physi cal I O byt es saved by st or age i ndex 1, 786, 642,
432
cel l physi cal I O i nt er connect byt es 2, 496, 624
cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan 2, 488, 432
consi st ent get s 220, 365
db bl ock get s 0
physi cal r eads 220, 357
physi cal r eads di r ect 220, 356
8 r ows sel ect ed.
El apsed: 00: 00: 00. 00
The statistics above should look familiar; in fact, they are identical to the previous
numbers before the update. We had updated this column with the same values,
and as expected, cel l sr v did the work we would expect and populate region
index values with the same high/low combinations across each storage region in
which MYOBJ _TEST4 was stored. What this test shows is that Storage Indexes
"work" with DML; region index values are not wiped out or otherwise invalidated,
but maintained.
What happens if we update some of these rows and not commit? Let's try it:
SESS2 SQL> sel ect sysdat e f r omdual ;
SYSDATE
- - - - - - - - - - - - - - - - - -
09- MAR 13 23: 59: 24
El apsed: 00: 00: 00. 00
SESS2 SQL> updat e d14. myobj _t est 4
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 4 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
2 set col 1=col 1
3 wher e col 1 bet ween 1 and 10;
El apsed: 00: 00: 18. 54
SESS2 SQL>
Now we'll execute our same test query from a different session:
SESS1 SQL> SELECT count ( col 1)
2 FROM d14. myobj _t est 4
3 wher e col 1 bet ween 1 and 10;
COUNT( COL1)
- - - - - - - - - - -
204470
El apsed: 00: 00: 01. 94
SESS1 SQL> @si _myst at . sql
SESS1 SQL> set echo of f
SESS1 SQL> sel ect st at . name,
2 sess. val ue val ue
3 f r om v$myst at sess,
4 v$st at name st at
5 wher e st at . st at i st i c# = sess. st at i st i c#
6 and st at . name i n
7 ( ' cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad' ,
8 ' cel l physi cal I O i nt er connect byt es' ,
9 ' cel l physi cal I O byt es saved by st or age i ndex' ,
10 ' cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan
' ,
11 ' consi st ent get s' , ' db bl ock get s' ,
12 ' physi cal r eads' , ' physi cal r eads di r ect ' )
13 or der by 1
14 /
St at i st i c Val ue
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad 1, 805, 15
6, 352
cel l physi cal I O byt es saved by st or age i ndex 1, 786, 64
2, 432
cel l physi cal I O i nt er connect byt es 42, 168, 6
32
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 5 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
76
consi st ent get s 438, 018
db bl ock get s 0
physi cal r eads 223, 324
physi cal r eads di r ect 220, 356
8 r ows sel ect ed.
From the statistics above, note the following:
The number of bytes eligible for predicate offload was the same as the
previous tests, which is expected
The number of bytes saved by Storage Indexes was also the same; we'll
come back to this towards the end of the post, but for now we can ascertain
that at the point-in-time that we conducted the test, the data residing in the
storage region's region indexes was the same as before the update
The number of bytes transmitted over the interconnect was higher compared
to the previous test. This is showing that in order to satisfy Oracle's
consistent read mechanisms, at least some of the data was required to be
shipped as blocks, not rows/columns (i.e., cel l sr v became a block server
not a row/column server)
The number of consistent gets was double the value as compared to before.
This is expected, since CR reads were required to fetch the read-consistent
image of blocks
Now, in our original session, let's commit and throw in a checkpoint for good
measure:
SESS2 SQL> commi t ;
Commi t compl et e.
El apsed: 00: 00: 00. 00
SESS2 SQL> al t er syst emcheckpoi nt ;
Syst emal t er ed.
El apsed: 00: 00: 02. 23
In our original session we'll execute our test query:
SESS1 SQL> SELECT count ( col 1)
2 FROM d14. myobj _t est 4
3 wher e col 1 bet ween 1 and 10;
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 6 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
COUNT( COL1)
- - - - - - - - - - -
El apsed: 00: 00: 00. 10
SESS1 SQL> @si _myst at . sql
SESS1 SQL> set echo of f
SESS1 SQL> sel ect st at . name,
2 sess. val ue val ue
3 f r om v$myst at sess,
4 v$st at name st at
5 wher e st at . st at i st i c# = sess. st at i st i c#
6 and st at . name i n
7 ( ' cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad' ,
8 ' cel l physi cal I O i nt er connect byt es' ,
9 ' cel l physi cal I O byt es saved by st or age i ndex' ,
10 ' cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan
' ,
11 ' consi st ent get s' , ' db bl ock get s' ,
12 ' physi cal r eads' , ' physi cal r eads di r ect ' )
13 or der by 1
14 /
St at i st i c Val ue
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad 1, 805, 156,
352
cel l physi cal I O byt es saved by st or age i ndex 1, 786, 642,
432
cel l physi cal I O i nt er connect byt es 2, 496, 624
cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan 2, 488, 432
consi st ent get s 220, 365
db bl ock get s 0
physi cal r eads 220, 357
physi cal r eads di r ect 220, 356
8 r ows sel ect ed.
Above, we see that our statistics are "back to normal". Again, we updated COL1
and set it equal to itself, so we'd expect to see the same values across our
statistics.
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 7 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
query? Below, I'll update the table and set COL1=COL1+10 to leave no rows that
match our test query's predicate condition, without committing:
SESS2 SQL> sel ect sysdat e f r omdual ;
SYSDATE
- - - - - - - - - - - - - - - - - -
10- MAR 13 00: 05: 53
El apsed: 00: 00: 00. 00
SESS2 SQL> updat e d14. myobj _t est 4
2 set col 1=col 1+10
3 wher e col 1 bet ween 1 and 10;
204470 r ows updat ed.
El apsed: 00: 00: 18. 12
SESS2 SQL>
From our first session, let's run our query:
SESS1 SQL> SELECT count ( col 1)
2 FROM d14. myobj _t est 4
3 wher e col 1 bet ween 1 and 10;
COUNT( COL1)
- - - - - - - - - - -
204470
El apsed: 00: 00: 02. 12
SESS1 SQL> @si _myst at . sql
SESS1 SQL> set echo of f
SESS1 SQL> sel ect st at . name,
2 sess. val ue val ue
3 f r om v$myst at sess,
4 v$st at name st at
5 wher e st at . st at i st i c# = sess. st at i st i c#
6 and st at . name i n
7 ( ' cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad' ,
8 ' cel l physi cal I O i nt er connect byt es' ,
9 ' cel l physi cal I O byt es saved by st or age i ndex' ,
10 ' cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan
' ,
11 ' consi st ent get s' , ' db bl ock get s' ,
12 ' physi cal r eads' , ' physi cal r eads di r ect ' )
13 or der by 1
14 /
St at i st i c Val ue
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 8 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
, 352
cel l physi cal I O byt es saved by st or age i ndex 1, 786, 642
, 432
cel l physi cal I O i nt er connect byt es 42, 152, 40
0
cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan 17, 854, 92
8
consi st ent get s 438, 018
db bl ock get s 0
physi cal r eads 223, 322
physi cal r eads di r ect 220, 356
Very similar to our previous update-without-commit scenario, we see higher values
for bytes transmitted over the interconnect, the same Smart Scan/Storage Index
savings, and a higher value for consistent gets. If we now commit from our
second session:
SESS2 SQL> commi t ;
Commi t compl et e.
El apsed: 00: 00: 00. 01
SESS2 SQL> al t er syst emcheckpoi nt ;
Syst emal t er ed.
El apsed: 00: 00: 03. 33
SESS2 SQL> al t er syst emswi t ch l ogf i l e;
Syst emal t er ed.
El apsed: 00: 00: 00. 03
SESS2 SQL>
... and re-execute our query, our statistics look like this:
SESS1 SQL> SELECT count ( col 1)
2 FROM d14. myobj _t est 4
3 wher e col 1 bet ween 1 and 10;
COUNT( COL1)
- - - - - - - - - - -
0
El apsed: 00: 00: 00. 10
SESS1 SQL> @si _myst at . sql
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 9 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
SESS1 SQL> set echo of f
SQL> sel ect st at . name,
3 f r om v$myst at sess,
4 v$st at name st at
5 wher e st at . st at i st i c# = sess. st at i st i c#
6 and st at . name i n
7 ( ' cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad' ,
8 ' cel l physi cal I O i nt er connect byt es' ,
9 ' cel l physi cal I O byt es saved by st or age i ndex' ,
10 ' cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan
' ,
11 ' consi st ent get s' , ' db bl ock get s' ,
12 ' physi cal r eads' , ' physi cal r eads di r ect ' )
13 or der by 1
14 /
St at i st i c Val ue
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad 1, 805, 156,
352
cel l physi cal I O byt es saved by st or age i ndex 1, 786, 642,
432
cel l physi cal I O i nt er connect byt es 17, 871, 312
cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan 17, 854, 928
consi st ent get s 222, 544
db bl ock get s 0
physi cal r eads 220, 358
physi cal r eads di r ect 220, 356
8 r ows sel ect ed.
From the above test, we see 0 rows returned, the same number of bytes eligible
for predicate offload, but also the same values for Storage Index savings.
Additionally, the number of bytes transmitted over the interconnect is higher than
we would expect based on the zero-row query output.
This happens because cellsrv hasn't yet "warmed up" the region index values with
the data that should (eventually) exist on disk. To confirm this, we simply ran our
test query a couple more times and after about a half minute or so, our statistics
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 10 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
show that values we would expect:
2 FROM d14. myobj _t est 4
3 wher e col 1 bet ween 1 and 10;
COUNT( COL1)
- - - - - - - - - - -
0
El apsed: 00: 00: 00. 06
SESS1 SQL> @si _myst at . sql
SESS1 SQL> set echo of f
SQL> sel ect st at . name,
2 sess. val ue val ue
3 f r om v$myst at sess,
4 v$st at name st at
5 wher e st at . st at i st i c# = sess. st at i st i c#
6 and st at . name i n
7 ( ' cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad' ,
8 ' cel l physi cal I O i nt er connect byt es' ,
9 ' cel l physi cal I O byt es saved by st or age i ndex' ,
10 ' cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan
' ,
11 ' consi st ent get s' , ' db bl ock get s' ,
12 ' physi cal r eads' , ' physi cal r eads di r ect ' )
13 or der by 1
14 /
St at i st i c Val ue
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad 1, 805, 156
, 352
cel l physi cal I O byt es saved by st or age i ndex 1, 804, 189
, 696
cel l physi cal I O i nt er connect byt es 25, 944
cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan 1, 368
consi st ent get s 220, 365
db bl ock get s 0
physi cal r eads 220, 359
physi cal r eads di r ect 220, 356
8 r ows sel ect ed.
Above, we see that our new statistic for
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 11 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
st or age i ndex is higher than in previous tests and nearly equal to the number
of bytes eligible for predicate offload - reasonable considering that our query
interconnect is now much lower than in the previous tests.
This demonstrates an interesting thing about Storage Indexes - they don't seem to
be "updated" immediately as data is either updated or fetched via SELECT, but
rather, can take a bit of time to properly stage and update. Eventually, the region
index data will reflect what's on disk and when this is true, your Storage Index
savings will be what they should be.
So what happens when updated blocks trickle to disk before a commit? In other
words, let's say we update some rows, DBWR gets these written to disk, and
subsequent queries occur? Let's update a number of rows in our table, not do a
commit, but flush our buffer cache and checkpoint. Before doing this, let's run a
test query:
SESS1 SQL> al t er syst emf l ush buf f er _cache;
Syst emal t er ed.
El apsed: 00: 00: 00. 25
SESS1 SQL> SELECT count ( col 1)
2 FROM d14. myobj _t est 4
3 wher e col 1 bet ween 11 and 20;
COUNT( COL1)
- - - - - - - - - - -
408940
El apsed: 00: 00: 00. 13
SESS1 SQL> @si _myst at . sql
SESS1 SQL> set echo of f
SESS1 SQL> sel ect st at . name,
2 sess. val ue val ue
3 f r om v$myst at sess,
4 v$st at name st at
5 wher e st at . st at i st i c# = sess. st at i st i c#
6 and st at . name i n
7 ( ' cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad' ,
8 ' cel l physi cal I O i nt er connect byt es' ,
9 ' cel l physi cal I O byt es saved by st or age i ndex' ,
10 ' cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan
' ,
11 ' consi st ent get s' , ' db bl ock get s' ,
12 ' physi cal r eads' , ' physi cal r eads di r ect ' )
13 or der by 1
14 /
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 12 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
St at i st i c Val ue
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad 1, 805, 156
, 352
cel l physi cal I O byt es saved by st or age i ndex 1, 769, 095
, 168
cel l physi cal I O i nt er connect byt es 4, 983, 336
cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan 4, 975, 144
consi st ent get s 220, 365
db bl ock get s 0
physi cal r eads 220, 357
physi cal r eads di r ect 220, 356
8 r ows sel ect ed.
El apsed: 00: 00: 00. 00
SQL>
Since we retrieved more data than in previous tests, we would expect a smaller
Storage Index savings and more bytes shipped over the interconnect, which is
what we see. Now let's update these rows, not commit, but flush our buffer cache
and do a checkpoint:
SESS2 SQL> al t er syst emf l ush buf f er _cache;
Syst emal t er ed.
El apsed: 00: 00: 00. 17
SESS2 SQL> sel ect sysdat e f r omdual ;
SYSDATE
- - - - - - - - - - - - - - - - - -
10- MAR 13 01: 16: 50
El apsed: 00: 00: 00. 00
SESS2 SQL> updat e d14. myobj _t est 4
2 set col 1=col 1+10
3 wher e col 1 bet ween 11 and 20;
408940 r ows updat ed.
El apsed: 00: 00: 19. 61
SESS2 SQL> al t er syst emf l ush buf f er _cache;
Syst emal t er ed.
El apsed: 00: 00: 00. 29
SESS2 SQL> al t er syst emcheckpoi nt ;
Syst emal t er ed.
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 13 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
El apsed: 00: 00: 03. 33
SESS2 SQL>
Now, if we run our test query (several times, after a 5 minute period to ensure that
region indexes have a chance of "updating"), we see this:
SESS1 SQL> SELECT count ( col 1)
2 FROM d14. myobj _t est 4
3 wher e col 1 bet ween 11 and 20;
COUNT( COL1)
- - - - - - - - - - -
408940
El apsed: 00: 00: 04. 06
SESS1 SQL> @si _myst at . sql
SESS1 SQL> set echo of f
SESS1 SQL> sel ect st at . name,
2 sess. val ue val ue
3 f r om v$myst at sess,
4 v$st at name st at
5 wher e st at . st at i st i c# = sess. st at i st i c#
6 and st at . name i n
7 ( ' cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad' ,
8 ' cel l physi cal I O i nt er connect byt es' ,
9 ' cel l physi cal I O byt es saved by st or age i ndex' ,
10 ' cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan
' ,
11 ' consi st ent get s' , ' db bl ock get s' ,
12 ' physi cal r eads' , ' physi cal r eads di r ect ' )
13 or der by 1
14 /
St at i st i c Val ue
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
cel l physi cal I O byt es el i gi bl e f or pr edi cat e of f l oad 1, 805, 156
, 352
cel l physi cal I O byt es saved by st or age i ndex 1, 769, 095
, 168
cel l physi cal I O i nt er connect byt es 84, 287, 35
2
cel l physi cal I O i nt er connect byt es r et ur ned by smar t scan 35, 700, 60
0
Dynamic Views template. Powered by Blogger.
Classic
search
Send feedback
Page 14 of 113 John Clarke's Blog
2/6/2014 http://jccoracle.blogspot.in/
db bl ock get s 0
physi cal r eads 226, 287
8 r ows sel ect ed.
El apsed: 00: 00: 00. 00
SESS1 SQL>
Above, we see more consistent gets and more bytes shipped over the
interconnect for the same CR reasons as before, but interestingly our bytes saved
by Storage Indexes remained 1,769,095,168. This, I believe, tells us that region
index values will not get updated until data is actually committed to disk, not just
written to disk in an uncommitted state (which a checkpoint will do).
Conclusion
As documented, Exadata Storage Indexes are maintained and updated
automatically by Oracle and Storage Index values will reflect the high/low values
per storage region for queries that access data using WHERE clauses and Smart
Scan. When rows in a table are updated, it appears as if these region index
values are updated upon commit and at least on the software versions used in this
test, your Storage Index I/O savings will reflect the values of the last committed
state of the data. While consistent reads will typically lead to less efficient Smart
Scans, it looks as if the Storage Index I/O savings are changed at the time of
commits (or rather, shortly thereafter).
Posted 10th March 2013 by J ohn Clarke