SlideShare a Scribd company logo
1 of 28
Oracle Indexes: From the Concept to Internals
Prepared by:
Deiby Gómez
Oracle ACE & OCM 11g
Pythian Oracle Consultant
Session ID#: 292
© 2014 Pythian Confidential2
- Oracle ACE (23 years old)
- Oracle Certified Master 11g (24 years old)
- OCP 11g & 12c, RAC 11g, SOA, Exadata X3
- President of Guatemala Oracle User Group
- Pythian Oracle Database Consultant
Twitter: @hdeiby
Facebook: /HDeiby
Email: gomez@pythian.com
Blog: www.oraclefromguatemala.com.gt
© 2014 Pythian Confidential3
WHAT IS AN “INDEX”?
© 2014 Pythian Confidential4
B-TREE INDEXES
© 2014 Pythian Confidential5
Root (Branch)
Branch
Leaf
B-TREE INDEX: CONCEPTS
© 2014 Pythian Confidential6
WHAT IS AN “INDEX”?
© 2014 Pythian Confidential7
B-TREE INDEX: INTERNALS
Header
Free Space
Data
© 2014 Pythian Confidential8
B-TREE INDEX: INTERNALS
Leaf node Branch node
Branch block dump
=================
header address 139950945835596=0x7f48de699a4c
kdxcolev 2
KDXCOLEV Flags = - - -
kdxcolok 0
kdxcoopc 0x80: opcode=0: iot flags=--- is
converted=Y
kdxconco 1
kdxcosdc 0
kdxconro 1
kdxcofbo 30=0x1e
kdxcofeo 8048=0x1f70
kdxcoavs 8018
kdxbrlmc 16779590=0x1000946
kdxbrsno 0
kdxbrbksz 8056
kdxbr2urrc 0
Leaf block dump
===============
header address 139950941831268=0x7f48de2c8064
kdxcolev 0
KDXCOLEV Flags = - - -
kdxcolok 0
kdxcoopc 0x80: opcode=0: iot flags=--- is
converted=Y
kdxconco 1
kdxcosdc 0
kdxconro 1
kdxcofbo 38=0x26
kdxcofeo 8021=0x1f55
kdxcoavs 7983
kdxlespl 0
kdxlende 0
kdxlenxt 0=0x0
kdxleprv 0=0x0
kdxledsz 6
kdxlebksz 8032
row#0[8021] flag: ------, lock: 0, len=11, data:(6):
01 00 00 85 00 00
col 0; len 2; (2): c1 02
----- end of leaf block dump -----
row#0[8048] dba: 16779592=0x1000948
col 0; len 3; (3): c2 09 10
----- end of branch block dump -----
© 2014 Pythian Confidential9
B-TREE INDEX: INTERNALS
Leaf node Branch node
Branch block dump
=================
header address 139950945835596=0x7f48de699a4c
kdxcolev 2
KDXCOLEV Flags = - - -
kdxcolok 0
kdxcoopc 0x80: opcode=0: iot flags=--- is
converted=Y
kdxconco 1
kdxcosdc 0
kdxconro 1
kdxcofbo 30=0x1e
kdxcofeo 8048=0x1f70
kdxcoavs 8018
kdxbrlmc 16779590=0x1000946<--Address to Prev
Node
kdxbrsno 0<--Last index entry modified
kdxbrbksz 8056<--usable space in the block.
kdxbr2urrc 0
row#0[8048] dba: 16779592=0x1000948 <--Pointer
to the 2nd intermediate branch block
col 0; len 3; (3): c2 09 10 <--first column
value used to navigate
----- end of branch block dump -----
Leaf block dump
===============
header address 139950941831268=0x7f48de2c8064
kdxcolev 0 <--block level
KDXCOLEV Flags = - - -
kdxcolok 0 <--itl of service tx holding block lock
kdxcoopc 0x80: opcode=0: iot flags=--- is converted=Y
<--block lock op code
kdxconco 1<--number of columns
kdxcosdc 0<--Split or Deleted count
kdxconro 1<--Number of entries
kdxcofbo 38=0x26 <--offset where the free space in
this block starts
kdxcofeo 8021=0x1f55 <--offset where the free space
in this block finishes
kdxcoavs 7983 <--(kdxcofeo-kdxcofbo) The free space!
kdxlespl 0<--space held by unlocked split entries
kdxlende 0 <--entries deleted
kdxlenxt 0=0x0 <--there is not pointer to Next Leaf
Node
kdxleprv 0=0x0 <--there is not pointer to Previous
Leaf Node
kdxledsz 6<--bytes used by rowed data (KEYDATA)
kdxlebksz 8032<--usable space in the block.
row#0[8021] flag: ------, lock: 0, len=11, data:(6):
01 00 00 85 00 00
col 0; len 2; (2): c1 02
----- end of leaf block dump -----
© 2014 Pythian Confidential10
B-TREE INDEX SELECT OPERATION: CONCEPTS
1,rowid
1,rowid 2,rowid
1,rowid 2,rowid …. 814,rowid 815,rowid
create table dgomez.t1(id number,value varchar2(20));
Select id,value from dgomez.t1 where id=2;
1,rowid 2,rowid …… 814,rowid 815,rowid
ID Value
2 Deiby
Note: 1 entry per Leaf Node
© 2014 Pythian Confidential11
B-TREE INDEX SELECT OPERATION: INTERNALS
SQL> select id, value from dgomez.t1 where id=2;
ID V
---------- -
2 Deiby
Execution Plan
----------------------------------------------------------
Plan hash value: 408250987
-----------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 1 | 15 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 15 | 2 (0)| 00:00:01 |
|* 2 | INDEX UNIQUE SCAN | BTREE | 1 | | 2 (0)| 00:00:01 |
-----------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
2 - access("ID"=2)
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
4 consistent gets
0 physical reads
0 redo size
457 bytes sent via SQL*Net to client
508 bytes received via SQL*Net from client
1 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
1 rows processed
SQL>
© 2014 Pythian Confidential12
B-TREE INDEX DELETE OPERATION: INTERNALS
Delete from ioug.t1 where vkey='D';
row#0[8021] flag: ------, lock: 0, len=11
col 0; len 1; (1): 41
col 1; len 6; (6): 01 80 00 87 00 00
row#1[8010] flag: ------, lock: 0, len=11
col 0; len 1; (1): 42
col 1; len 6; (6): 01 80 00 87 00 01
row#2[7977] flag: ------, lock: 0, len=11
col 0; len 1; (1): 43
col 1; len 6; (6): 01 80 00 87 00 03
row#3[7988] flag: ---D--, lock: 2, len=11
col 0; len 1; (1): 44 <---vkey=’D’
col 1; len 6; (6): 01 80 00 87 00 02
----- end of leaf block dump -----v
• The entry is just marked as “deleted” but it is not
deleted really.
• The deleted Index entry can be reused.
© 2014 Pythian Confidential13
B-TREE INDEX UPDATE OPERATION: INTERNALS
row#0[8021] flag: ------, lock: 0, len=11
col 0; len 1; (1): 41
col 1; len 6; (6): 01 80 00 87 00 00
row#1[8010] flag: ------, lock: 0, len=11
col 0; len 1; (1): 42
col 1; len 6; (6): 01 80 00 87 00 01
row#2[7999] flag: ---D--, lock: 2, len=11
col 0; len 1; (1): 43 <---vkey=’C’
col 1; len 6; (6): 01 80 00 87 00 02
row#3[7988] flag: ------, lock: 2, len=11
col 0; len 1; (1): 44 <---vkey=’D’
col 1; len 6; (6): 01 80 00 87 00 02
----- end of leaf block dump -----
update ioug.t1 set vvalue=‘D' where vkey='C';
© 2014 Pythian Confidential14 14
BITMAP INDEXES
© 2014 Pythian Confidential15
BITMAP INDEX: CONCEPTS
15
© 2014 Pythian Confidential16
BITMAP INDEX: CONCEPTS
© 2014 Pythian Confidential17
BITMAP INDEX SELECT OPERATION
17
© 2014 Pythian Confidential18
BITMAP INDEX UPDATE OPERATION
18
row#0[8005] flag: ------, lock: 0, len=27
col 0; len 6; (6): 43 61 6e 61 64 61
col 1; len 6; (6): 01 80 00 83 00 00
col 2; len 6; (6): 01 80 00 83 00 0f
col 3; len 3; (3): c9 0c 03
row#1[7886] flag: ------, lock: 2, len=35
col 0; len 9; (9): 47 55 41 54 45 4d 41 4c 41vkey=GUATEMALA
col 1; len 6; (6): 00 00 00 00 00 00 Beginning of ROWIDs
col 2; len 6; (6): 01 80 00 83 00 0f Ending of ROWIDs
col 3; len 8; (8): f9 91 df 80 dc 08 61 08 Bitmap String
row#2[7975] flag: ---D--, lock: 2, len=30
col 0; len 9; (9): 47 75 61 74 65 6d 61 6c 61vkey=Guatemala
col 1; len 6; (6): 01 80 00 83 00 00 Beginning of ROWIDs
col 2; len 6; (6): 01 80 00 83 00 0f Ending of ROWIDs
col 3; len 3; (3): c9 61 08 Bitmap String
row#3[7948] flag: ------, lock: 0, len=27
col 0; len 6; (6): 4d 65 78 69 63 6f
col 1; len 6; (6): 01 80 00 83 00 00
col 2; len 6; (6): 01 80 00 83 00 0f
col 3; len 3; (3): c9 92 04
----- end of leaf block dump -----
update ioug.t1 set vkey='GUATEMALA' where vkey='Guatemala';
© 2014 Pythian Confidential19
BITMAP INDEX INSERT OPERATION
• If the KEY exists:
– The Bitmap String is updated
• If the KEY doesn’t exist
– A new Bitmap Entry is created with its
own Bitmap String
19
© 2014 Pythian Confidential20
BITMAP INDEX DELETE OPERATION
• If after the deletion there are some rows with the KEY afer
the DELETE operation, then the Index is not marked as
deleted and only the Bitmap String is updated with “0” in
the positions where our deleted rows were stored.
• If after delete there is no any row with the KEY after the
DELETE operatioN, then the Index Entry is marked as
deleted with “--D--”
20
row#2[7975] flag: ---D--, lock: 2, len=30
Before-->
Delete Op-->
After-->
Before-->
After-->
© 2014 Pythian Confidential21 21
FUNCTION-BASED INDEXES
© 2014 Pythian Confidential22
FUNCTION-BASED INDEX
22
create index functionbasedIDX on dgomez(upper(value));
insert into dgomez values (1,'deiby');
Leaf block dump
===============
…..
…..
row#0[8017] flag: ------, lock: 0, len=15
col 0; len 5; (5): 44 45 49 42 59 ’DEIBY’(not ‘deiby’)
col 1; len 6; (6): 01 40 00 83 00 00
----- end of leaf block dump -----
• The same B-Tree structure and
• The same behavior than B-Tree Indexes but
with the values stored with the function applied.
© 2014 Pythian Confidential23 23
REVERSED-KEY INDEXES
© 2014 Pythian Confidential24
REVERSED-KEY INDEX
24
• The same B-Tree structure and
• Every byte of the KEY is reversed .
create index reversekeyIDX on dgomez(value) reverse;
• 204
• 205
• 206
• 207
• 402
• 502
• 602
• 702
© 2014 Pythian Confidential25
REVERSED-KEY INDEX
25
• The same B-Tree structure and
• Every byte of the KEY is reversed .
create index reversekeyIDX on dgomez(value) reverse;
row#0[8019] flag: ------, lock: 0, len=13
col 0; len 3; (3): 34 30 32<-The value
col 1; len 6; (6): 02 40 00 87 00 04<-RowID
row#1[8006] flag: ------, lock: 0, len=13
col 0; len 3; (3): 35 30 32
col 1; len 6; (6): 02 40 00 87 00 05
row#2[7993] flag: ------, lock: 0, len=13
col 0; len 3; (3): 36 30 32
col 1; len 6; (6): 02 40 00 87 00 06
row#3[7980] flag: ------, lock: 0, len=13
col 0; len 3; (3): 37 30 32
col 1; len 6; (6): 02 40 00 87 00 07
----- end of leaf block dump -----
34 30 32 => 4 0 2
35 30 32 => 5 0 2
36 30 32 => 6 0 2
37 30 32 => 7 0 2
But not…
204
205
206
207
© 2014 Pythian Confidential26 26
INDEXES ON VIRTUAL COLUMNS
© 2014 Pythian Confidential27
INDEXES ON VIRTUAL COLUMNS
27
create table dgomez(
value1 varchar(10),
value2 varchar2(10),
result as (value1||value2));
row#0[8017] flag: ------, lock: 0, len=15
col 0; len 5; (5): 64 65 69 62 79 <--deiby
col 1; len 6; (6): 01 40 00 87 00 00 <---ROWID
----- end of leaf block dump -----
create index vcolumn on dgomez(result);
insert into dgomez (value1,value2) values ('dei','by');
• The same B-Tree structure
• The dynamic value of KEY is stored physically.
• A change on dependent column will update the Index
© 2014 Pythian Confidential28

More Related Content

What's hot

Sangam 18 - The New Optimizer in Oracle 12c
Sangam 18 - The New Optimizer in Oracle 12cSangam 18 - The New Optimizer in Oracle 12c
Sangam 18 - The New Optimizer in Oracle 12cConnor McDonald
 
All on Adaptive and Extended Cursor Sharing
All on Adaptive and Extended Cursor SharingAll on Adaptive and Extended Cursor Sharing
All on Adaptive and Extended Cursor SharingMohamed Houri
 
Examining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail FilesExamining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail FilesBobby Curtis
 
#dbhouseparty - Real World Problem Solving with SQL
#dbhouseparty - Real World Problem Solving with SQL#dbhouseparty - Real World Problem Solving with SQL
#dbhouseparty - Real World Problem Solving with SQLTammy Bednar
 
Database-Migration and -Upgrade with Transportable Tablespaces
Database-Migration and -Upgrade with Transportable TablespacesDatabase-Migration and -Upgrade with Transportable Tablespaces
Database-Migration and -Upgrade with Transportable TablespacesMarkus Flechtner
 
Oracle Globalization Support, NLS_LENGTH_SEMANTICS, Unicode
Oracle Globalization Support, NLS_LENGTH_SEMANTICS, UnicodeOracle Globalization Support, NLS_LENGTH_SEMANTICS, Unicode
Oracle Globalization Support, NLS_LENGTH_SEMANTICS, UnicodeMarkus Flechtner
 
The three investigators: OraChk, TFA and DBSAT
The three investigators: OraChk, TFA and DBSATThe three investigators: OraChk, TFA and DBSAT
The three investigators: OraChk, TFA and DBSATMarkus Flechtner
 
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2Markus Flechtner
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in DataguardJason Arneil
 
Tech Talk: Best Practices for Data Modeling
Tech Talk: Best Practices for Data ModelingTech Talk: Best Practices for Data Modeling
Tech Talk: Best Practices for Data ModelingScyllaDB
 
Latin America Tour 2019 - 18c and 19c featues
Latin America Tour 2019   - 18c and 19c featuesLatin America Tour 2019   - 18c and 19c featues
Latin America Tour 2019 - 18c and 19c featuesConnor McDonald
 
pstack, truss etc to understand deeper issues in Oracle database
pstack, truss etc to understand deeper issues in Oracle databasepstack, truss etc to understand deeper issues in Oracle database
pstack, truss etc to understand deeper issues in Oracle databaseRiyaj Shamsudeen
 
Oracle Application Containers
Oracle Application ContainersOracle Application Containers
Oracle Application ContainersMarkus Flechtner
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseuzzal basak
 

What's hot (18)

Sap application log
Sap application logSap application log
Sap application log
 
Sangam 18 - The New Optimizer in Oracle 12c
Sangam 18 - The New Optimizer in Oracle 12cSangam 18 - The New Optimizer in Oracle 12c
Sangam 18 - The New Optimizer in Oracle 12c
 
All on Adaptive and Extended Cursor Sharing
All on Adaptive and Extended Cursor SharingAll on Adaptive and Extended Cursor Sharing
All on Adaptive and Extended Cursor Sharing
 
Examining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail FilesExamining Oracle GoldenGate Trail Files
Examining Oracle GoldenGate Trail Files
 
#dbhouseparty - Real World Problem Solving with SQL
#dbhouseparty - Real World Problem Solving with SQL#dbhouseparty - Real World Problem Solving with SQL
#dbhouseparty - Real World Problem Solving with SQL
 
Database-Migration and -Upgrade with Transportable Tablespaces
Database-Migration and -Upgrade with Transportable TablespacesDatabase-Migration and -Upgrade with Transportable Tablespaces
Database-Migration and -Upgrade with Transportable Tablespaces
 
Oracle Globalization Support, NLS_LENGTH_SEMANTICS, Unicode
Oracle Globalization Support, NLS_LENGTH_SEMANTICS, UnicodeOracle Globalization Support, NLS_LENGTH_SEMANTICS, Unicode
Oracle Globalization Support, NLS_LENGTH_SEMANTICS, Unicode
 
The three investigators: OraChk, TFA and DBSAT
The three investigators: OraChk, TFA and DBSATThe three investigators: OraChk, TFA and DBSAT
The three investigators: OraChk, TFA and DBSAT
 
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2
Oracle Multitenant Database 2.0 - Improvements in Oracle Database 12c Release 2
 
Rac questions
Rac questionsRac questions
Rac questions
 
Adventures in Dataguard
Adventures in DataguardAdventures in Dataguard
Adventures in Dataguard
 
Tech Talk: Best Practices for Data Modeling
Tech Talk: Best Practices for Data ModelingTech Talk: Best Practices for Data Modeling
Tech Talk: Best Practices for Data Modeling
 
Latin America Tour 2019 - 18c and 19c featues
Latin America Tour 2019   - 18c and 19c featuesLatin America Tour 2019   - 18c and 19c featues
Latin America Tour 2019 - 18c and 19c featues
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmaster
 
pstack, truss etc to understand deeper issues in Oracle database
pstack, truss etc to understand deeper issues in Oracle databasepstack, truss etc to understand deeper issues in Oracle database
pstack, truss etc to understand deeper issues in Oracle database
 
Oracle Application Containers
Oracle Application ContainersOracle Application Containers
Oracle Application Containers
 
Oracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby databaseOracle goldengate 11g schema replication from standby database
Oracle goldengate 11g schema replication from standby database
 
Oracle Data Guard
Oracle Data GuardOracle Data Guard
Oracle Data Guard
 

Viewers also liked

Diagnóstico de problemas de red para DBAs
Diagnóstico de problemas de red para DBAsDiagnóstico de problemas de red para DBAs
Diagnóstico de problemas de red para DBAsGuatemala User Group
 
Oracle Database Performance Tuning: The Not SQL Option
Oracle Database Performance Tuning: The Not SQL OptionOracle Database Performance Tuning: The Not SQL Option
Oracle Database Performance Tuning: The Not SQL OptionGuatemala User Group
 
Oracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New FeaturesOracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New FeaturesDeiby Gómez
 
12 Things about Oracle WebLogic Server 12c
12 Things	 about Oracle WebLogic Server 12c12 Things	 about Oracle WebLogic Server 12c
12 Things about Oracle WebLogic Server 12cGuatemala User Group
 
Re-­Think Mobile… Beyond Mobile­‐First: Oracle Mobile Strategy and Overview
Re-­Think Mobile… Beyond Mobile­‐First: Oracle Mobile Strategy and OverviewRe-­Think Mobile… Beyond Mobile­‐First: Oracle Mobile Strategy and Overview
Re-­Think Mobile… Beyond Mobile­‐First: Oracle Mobile Strategy and OverviewGuatemala User Group
 
Monitoreo del performance de linux con sar
Monitoreo del performance de linux con sarMonitoreo del performance de linux con sar
Monitoreo del performance de linux con sarGuatemala User Group
 
Crating a Robust Performance Strategy
Crating a Robust Performance StrategyCrating a Robust Performance Strategy
Crating a Robust Performance StrategyGuatemala User Group
 
Building Better Mobile Backends with Oracle Mobile Cloud Service
Building Better Mobile Backends with Oracle Mobile Cloud Service	Building Better Mobile Backends with Oracle Mobile Cloud Service
Building Better Mobile Backends with Oracle Mobile Cloud Service Guatemala User Group
 
Gestión de grandes volúmenes de información
Gestión de grandes volúmenes de informaciónGestión de grandes volúmenes de información
Gestión de grandes volúmenes de informaciónGuatemala User Group
 
Oracle Linux and Oracle Database - A Trusted Combination
Oracle Linux and Oracle Database - A Trusted Combination Oracle Linux and Oracle Database - A Trusted Combination
Oracle Linux and Oracle Database - A Trusted Combination Guatemala User Group
 
Oracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerOracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerGuatemala User Group
 
Oracle Insert Statements for DBAs and Developers
Oracle Insert Statements for DBAs and DevelopersOracle Insert Statements for DBAs and Developers
Oracle Insert Statements for DBAs and DevelopersGuatemala User Group
 
Best Features of Multitenant 12c
Best Features of Multitenant 12cBest Features of Multitenant 12c
Best Features of Multitenant 12cDeiby Gómez
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklistpraveen_01236
 
OTN Tour 2014: Rac 11g vs 12c
OTN Tour 2014: Rac 11g vs 12cOTN Tour 2014: Rac 11g vs 12c
OTN Tour 2014: Rac 11g vs 12cDeiby Gómez
 
Oracle Database 12c: Privilegios, Usuarios y Roles
Oracle Database 12c: Privilegios, Usuarios y RolesOracle Database 12c: Privilegios, Usuarios y Roles
Oracle Database 12c: Privilegios, Usuarios y RolesDeiby Gómez
 
Cloud Integration for Human Resources: Connect with Your talent in the Cloud
Cloud Integration for Human Resources: Connect with Your talent in the CloudCloud Integration for Human Resources: Connect with Your talent in the Cloud
Cloud Integration for Human Resources: Connect with Your talent in the CloudGuatemala User Group
 

Viewers also liked (20)

Diagnóstico de problemas de red para DBAs
Diagnóstico de problemas de red para DBAsDiagnóstico de problemas de red para DBAs
Diagnóstico de problemas de red para DBAs
 
Oracle Database Performance Tuning: The Not SQL Option
Oracle Database Performance Tuning: The Not SQL OptionOracle Database Performance Tuning: The Not SQL Option
Oracle Database Performance Tuning: The Not SQL Option
 
Oracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New FeaturesOracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New Features
 
12 Things about Oracle WebLogic Server 12c
12 Things	 about Oracle WebLogic Server 12c12 Things	 about Oracle WebLogic Server 12c
12 Things about Oracle WebLogic Server 12c
 
Re-­Think Mobile… Beyond Mobile­‐First: Oracle Mobile Strategy and Overview
Re-­Think Mobile… Beyond Mobile­‐First: Oracle Mobile Strategy and OverviewRe-­Think Mobile… Beyond Mobile­‐First: Oracle Mobile Strategy and Overview
Re-­Think Mobile… Beyond Mobile­‐First: Oracle Mobile Strategy and Overview
 
Monitoreo del performance de linux con sar
Monitoreo del performance de linux con sarMonitoreo del performance de linux con sar
Monitoreo del performance de linux con sar
 
Crating a Robust Performance Strategy
Crating a Robust Performance StrategyCrating a Robust Performance Strategy
Crating a Robust Performance Strategy
 
Building Better Mobile Backends with Oracle Mobile Cloud Service
Building Better Mobile Backends with Oracle Mobile Cloud Service	Building Better Mobile Backends with Oracle Mobile Cloud Service
Building Better Mobile Backends with Oracle Mobile Cloud Service
 
Oracle GoldenGate for Oracle DBAs
Oracle GoldenGate for Oracle DBAsOracle GoldenGate for Oracle DBAs
Oracle GoldenGate for Oracle DBAs
 
Gestión de grandes volúmenes de información
Gestión de grandes volúmenes de informaciónGestión de grandes volúmenes de información
Gestión de grandes volúmenes de información
 
Oracle Linux and Oracle Database - A Trusted Combination
Oracle Linux and Oracle Database - A Trusted Combination Oracle Linux and Oracle Database - A Trusted Combination
Oracle Linux and Oracle Database - A Trusted Combination
 
Cutting edge Essbase
Cutting edge EssbaseCutting edge Essbase
Cutting edge Essbase
 
Oracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerOracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with Docker
 
Oracle Insert Statements for DBAs and Developers
Oracle Insert Statements for DBAs and DevelopersOracle Insert Statements for DBAs and Developers
Oracle Insert Statements for DBAs and Developers
 
RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA
 
Best Features of Multitenant 12c
Best Features of Multitenant 12cBest Features of Multitenant 12c
Best Features of Multitenant 12c
 
Backup andrecoverychecklist
Backup andrecoverychecklistBackup andrecoverychecklist
Backup andrecoverychecklist
 
OTN Tour 2014: Rac 11g vs 12c
OTN Tour 2014: Rac 11g vs 12cOTN Tour 2014: Rac 11g vs 12c
OTN Tour 2014: Rac 11g vs 12c
 
Oracle Database 12c: Privilegios, Usuarios y Roles
Oracle Database 12c: Privilegios, Usuarios y RolesOracle Database 12c: Privilegios, Usuarios y Roles
Oracle Database 12c: Privilegios, Usuarios y Roles
 
Cloud Integration for Human Resources: Connect with Your talent in the Cloud
Cloud Integration for Human Resources: Connect with Your talent in the CloudCloud Integration for Human Resources: Connect with Your talent in the Cloud
Cloud Integration for Human Resources: Connect with Your talent in the Cloud
 

Similar to Indexes From the Concept to Internals

OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersConnor McDonald
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01Karam Abuataya
 
Sangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesSangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesConnor McDonald
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatFranck Pachot
 
Oracle Diagnostics : Explain Plans (Simple)
Oracle Diagnostics : Explain Plans (Simple)Oracle Diagnostics : Explain Plans (Simple)
Oracle Diagnostics : Explain Plans (Simple)Hemant K Chitale
 
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)Dave Stokes
 
Simulation based design and analysis of combined effect of various data secur...
Simulation based design and analysis of combined effect of various data secur...Simulation based design and analysis of combined effect of various data secur...
Simulation based design and analysis of combined effect of various data secur...IRJET Journal
 
IRJET- Simulation based design and analysis of combined effect of various ...
IRJET- 	  Simulation based design and analysis of combined effect of various ...IRJET- 	  Simulation based design and analysis of combined effect of various ...
IRJET- Simulation based design and analysis of combined effect of various ...IRJET Journal
 
Mod03 linking and accelerating
Mod03 linking and acceleratingMod03 linking and accelerating
Mod03 linking and acceleratingPeter Haase
 
Writing efficient sql
Writing efficient sqlWriting efficient sql
Writing efficient sqlj9soto
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performanceGuy Harrison
 
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleUnderstanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleGuatemala User Group
 
All you need to know about CREATE STATISTICS
All you need to know about CREATE STATISTICSAll you need to know about CREATE STATISTICS
All you need to know about CREATE STATISTICSEDB
 
شرح مبسط جدا لمنهج سيسكو CCNA
شرح مبسط جدا لمنهج سيسكو CCNAشرح مبسط جدا لمنهج سيسكو CCNA
شرح مبسط جدا لمنهج سيسكو CCNADawood Aqlan
 

Similar to Indexes From the Concept to Internals (20)

5 Cool Things About SQL
5 Cool Things About SQL5 Cool Things About SQL
5 Cool Things About SQL
 
OpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developersOpenWorld Sep14 12c for_developers
OpenWorld Sep14 12c for_developers
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01
 
Sangam 2019 - The Latest Features
Sangam 2019 - The Latest FeaturesSangam 2019 - The Latest Features
Sangam 2019 - The Latest Features
 
Oracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor formatOracle dbms_xplan.display_cursor format
Oracle dbms_xplan.display_cursor format
 
Oracle 11g caracteristicas poco documentadas 3 en 1
Oracle 11g caracteristicas poco documentadas 3 en 1Oracle 11g caracteristicas poco documentadas 3 en 1
Oracle 11g caracteristicas poco documentadas 3 en 1
 
Oracle Diagnostics : Explain Plans (Simple)
Oracle Diagnostics : Explain Plans (Simple)Oracle Diagnostics : Explain Plans (Simple)
Oracle Diagnostics : Explain Plans (Simple)
 
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
MySQL 8 -- A new beginning : Sunshine PHP/PHP UK (updated)
 
Simulation based design and analysis of combined effect of various data secur...
Simulation based design and analysis of combined effect of various data secur...Simulation based design and analysis of combined effect of various data secur...
Simulation based design and analysis of combined effect of various data secur...
 
IRJET- Simulation based design and analysis of combined effect of various ...
IRJET- 	  Simulation based design and analysis of combined effect of various ...IRJET- 	  Simulation based design and analysis of combined effect of various ...
IRJET- Simulation based design and analysis of combined effect of various ...
 
Mod03 linking and accelerating
Mod03 linking and acceleratingMod03 linking and accelerating
Mod03 linking and accelerating
 
Understanding index
Understanding indexUnderstanding index
Understanding index
 
Writing efficient sql
Writing efficient sqlWriting efficient sql
Writing efficient sql
 
MySQL 5.5 Guide to InnoDB Status
MySQL 5.5 Guide to InnoDB StatusMySQL 5.5 Guide to InnoDB Status
MySQL 5.5 Guide to InnoDB Status
 
Top 10 tips for Oracle performance
Top 10 tips for Oracle performanceTop 10 tips for Oracle performance
Top 10 tips for Oracle performance
 
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ OracleUnderstanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
 
All you need to know about CREATE STATISTICS
All you need to know about CREATE STATISTICSAll you need to know about CREATE STATISTICS
All you need to know about CREATE STATISTICS
 
شرح مبسط جدا لمنهج سيسكو CCNA
شرح مبسط جدا لمنهج سيسكو CCNAشرح مبسط جدا لمنهج سيسكو CCNA
شرح مبسط جدا لمنهج سيسكو CCNA
 
Switching 2
Switching 2Switching 2
Switching 2
 
ERTS UNIT 3.ppt
ERTS UNIT 3.pptERTS UNIT 3.ppt
ERTS UNIT 3.ppt
 

More from Deiby Gómez

Beneficios de Oracle Cloud
Beneficios de Oracle CloudBeneficios de Oracle Cloud
Beneficios de Oracle CloudDeiby Gómez
 
Por que actualizar a 12c
Por que actualizar a 12cPor que actualizar a 12c
Por que actualizar a 12cDeiby Gómez
 
Why to Upgrade to Oracle 12c
Why to Upgrade to Oracle 12cWhy to Upgrade to Oracle 12c
Why to Upgrade to Oracle 12cDeiby Gómez
 
Por qué la competitividad es importante
Por qué la competitividad es importantePor qué la competitividad es importante
Por qué la competitividad es importanteDeiby Gómez
 
Oracle Database 11g vs 12c
Oracle Database 11g vs 12cOracle Database 11g vs 12c
Oracle Database 11g vs 12cDeiby Gómez
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesDeiby Gómez
 
Best Practices to avoid ORA-01555
Best Practices to avoid ORA-01555Best Practices to avoid ORA-01555
Best Practices to avoid ORA-01555Deiby Gómez
 

More from Deiby Gómez (8)

Beneficios de Oracle Cloud
Beneficios de Oracle CloudBeneficios de Oracle Cloud
Beneficios de Oracle Cloud
 
Por que actualizar a 12c
Por que actualizar a 12cPor que actualizar a 12c
Por que actualizar a 12c
 
Why to Upgrade to Oracle 12c
Why to Upgrade to Oracle 12cWhy to Upgrade to Oracle 12c
Why to Upgrade to Oracle 12c
 
Por qué la competitividad es importante
Por qué la competitividad es importantePor qué la competitividad es importante
Por qué la competitividad es importante
 
El plan
El plan El plan
El plan
 
Oracle Database 11g vs 12c
Oracle Database 11g vs 12cOracle Database 11g vs 12c
Oracle Database 11g vs 12c
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New Features
 
Best Practices to avoid ORA-01555
Best Practices to avoid ORA-01555Best Practices to avoid ORA-01555
Best Practices to avoid ORA-01555
 

Recently uploaded

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 

Recently uploaded (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 

Indexes From the Concept to Internals

  • 1. Oracle Indexes: From the Concept to Internals Prepared by: Deiby Gómez Oracle ACE & OCM 11g Pythian Oracle Consultant Session ID#: 292
  • 2. © 2014 Pythian Confidential2 - Oracle ACE (23 years old) - Oracle Certified Master 11g (24 years old) - OCP 11g & 12c, RAC 11g, SOA, Exadata X3 - President of Guatemala Oracle User Group - Pythian Oracle Database Consultant Twitter: @hdeiby Facebook: /HDeiby Email: gomez@pythian.com Blog: www.oraclefromguatemala.com.gt
  • 3. © 2014 Pythian Confidential3 WHAT IS AN “INDEX”?
  • 4. © 2014 Pythian Confidential4 B-TREE INDEXES
  • 5. © 2014 Pythian Confidential5 Root (Branch) Branch Leaf B-TREE INDEX: CONCEPTS
  • 6. © 2014 Pythian Confidential6 WHAT IS AN “INDEX”?
  • 7. © 2014 Pythian Confidential7 B-TREE INDEX: INTERNALS Header Free Space Data
  • 8. © 2014 Pythian Confidential8 B-TREE INDEX: INTERNALS Leaf node Branch node Branch block dump ================= header address 139950945835596=0x7f48de699a4c kdxcolev 2 KDXCOLEV Flags = - - - kdxcolok 0 kdxcoopc 0x80: opcode=0: iot flags=--- is converted=Y kdxconco 1 kdxcosdc 0 kdxconro 1 kdxcofbo 30=0x1e kdxcofeo 8048=0x1f70 kdxcoavs 8018 kdxbrlmc 16779590=0x1000946 kdxbrsno 0 kdxbrbksz 8056 kdxbr2urrc 0 Leaf block dump =============== header address 139950941831268=0x7f48de2c8064 kdxcolev 0 KDXCOLEV Flags = - - - kdxcolok 0 kdxcoopc 0x80: opcode=0: iot flags=--- is converted=Y kdxconco 1 kdxcosdc 0 kdxconro 1 kdxcofbo 38=0x26 kdxcofeo 8021=0x1f55 kdxcoavs 7983 kdxlespl 0 kdxlende 0 kdxlenxt 0=0x0 kdxleprv 0=0x0 kdxledsz 6 kdxlebksz 8032 row#0[8021] flag: ------, lock: 0, len=11, data:(6): 01 00 00 85 00 00 col 0; len 2; (2): c1 02 ----- end of leaf block dump ----- row#0[8048] dba: 16779592=0x1000948 col 0; len 3; (3): c2 09 10 ----- end of branch block dump -----
  • 9. © 2014 Pythian Confidential9 B-TREE INDEX: INTERNALS Leaf node Branch node Branch block dump ================= header address 139950945835596=0x7f48de699a4c kdxcolev 2 KDXCOLEV Flags = - - - kdxcolok 0 kdxcoopc 0x80: opcode=0: iot flags=--- is converted=Y kdxconco 1 kdxcosdc 0 kdxconro 1 kdxcofbo 30=0x1e kdxcofeo 8048=0x1f70 kdxcoavs 8018 kdxbrlmc 16779590=0x1000946<--Address to Prev Node kdxbrsno 0<--Last index entry modified kdxbrbksz 8056<--usable space in the block. kdxbr2urrc 0 row#0[8048] dba: 16779592=0x1000948 <--Pointer to the 2nd intermediate branch block col 0; len 3; (3): c2 09 10 <--first column value used to navigate ----- end of branch block dump ----- Leaf block dump =============== header address 139950941831268=0x7f48de2c8064 kdxcolev 0 <--block level KDXCOLEV Flags = - - - kdxcolok 0 <--itl of service tx holding block lock kdxcoopc 0x80: opcode=0: iot flags=--- is converted=Y <--block lock op code kdxconco 1<--number of columns kdxcosdc 0<--Split or Deleted count kdxconro 1<--Number of entries kdxcofbo 38=0x26 <--offset where the free space in this block starts kdxcofeo 8021=0x1f55 <--offset where the free space in this block finishes kdxcoavs 7983 <--(kdxcofeo-kdxcofbo) The free space! kdxlespl 0<--space held by unlocked split entries kdxlende 0 <--entries deleted kdxlenxt 0=0x0 <--there is not pointer to Next Leaf Node kdxleprv 0=0x0 <--there is not pointer to Previous Leaf Node kdxledsz 6<--bytes used by rowed data (KEYDATA) kdxlebksz 8032<--usable space in the block. row#0[8021] flag: ------, lock: 0, len=11, data:(6): 01 00 00 85 00 00 col 0; len 2; (2): c1 02 ----- end of leaf block dump -----
  • 10. © 2014 Pythian Confidential10 B-TREE INDEX SELECT OPERATION: CONCEPTS 1,rowid 1,rowid 2,rowid 1,rowid 2,rowid …. 814,rowid 815,rowid create table dgomez.t1(id number,value varchar2(20)); Select id,value from dgomez.t1 where id=2; 1,rowid 2,rowid …… 814,rowid 815,rowid ID Value 2 Deiby Note: 1 entry per Leaf Node
  • 11. © 2014 Pythian Confidential11 B-TREE INDEX SELECT OPERATION: INTERNALS SQL> select id, value from dgomez.t1 where id=2; ID V ---------- - 2 Deiby Execution Plan ---------------------------------------------------------- Plan hash value: 408250987 ----------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | ----------------------------------------------------------------------- | 0 | SELECT STATEMENT | | 1 | 15 | 2 (0)| 00:00:01 | | 1 | TABLE ACCESS BY INDEX ROWID| T1 | 1 | 15 | 2 (0)| 00:00:01 | |* 2 | INDEX UNIQUE SCAN | BTREE | 1 | | 2 (0)| 00:00:01 | ----------------------------------------------------------------------- Predicate Information (identified by operation id): --------------------------------------------------- 2 - access("ID"=2) Statistics ---------------------------------------------------------- 0 recursive calls 0 db block gets 4 consistent gets 0 physical reads 0 redo size 457 bytes sent via SQL*Net to client 508 bytes received via SQL*Net from client 1 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 1 rows processed SQL>
  • 12. © 2014 Pythian Confidential12 B-TREE INDEX DELETE OPERATION: INTERNALS Delete from ioug.t1 where vkey='D'; row#0[8021] flag: ------, lock: 0, len=11 col 0; len 1; (1): 41 col 1; len 6; (6): 01 80 00 87 00 00 row#1[8010] flag: ------, lock: 0, len=11 col 0; len 1; (1): 42 col 1; len 6; (6): 01 80 00 87 00 01 row#2[7977] flag: ------, lock: 0, len=11 col 0; len 1; (1): 43 col 1; len 6; (6): 01 80 00 87 00 03 row#3[7988] flag: ---D--, lock: 2, len=11 col 0; len 1; (1): 44 <---vkey=’D’ col 1; len 6; (6): 01 80 00 87 00 02 ----- end of leaf block dump -----v • The entry is just marked as “deleted” but it is not deleted really. • The deleted Index entry can be reused.
  • 13. © 2014 Pythian Confidential13 B-TREE INDEX UPDATE OPERATION: INTERNALS row#0[8021] flag: ------, lock: 0, len=11 col 0; len 1; (1): 41 col 1; len 6; (6): 01 80 00 87 00 00 row#1[8010] flag: ------, lock: 0, len=11 col 0; len 1; (1): 42 col 1; len 6; (6): 01 80 00 87 00 01 row#2[7999] flag: ---D--, lock: 2, len=11 col 0; len 1; (1): 43 <---vkey=’C’ col 1; len 6; (6): 01 80 00 87 00 02 row#3[7988] flag: ------, lock: 2, len=11 col 0; len 1; (1): 44 <---vkey=’D’ col 1; len 6; (6): 01 80 00 87 00 02 ----- end of leaf block dump ----- update ioug.t1 set vvalue=‘D' where vkey='C';
  • 14. © 2014 Pythian Confidential14 14 BITMAP INDEXES
  • 15. © 2014 Pythian Confidential15 BITMAP INDEX: CONCEPTS 15
  • 16. © 2014 Pythian Confidential16 BITMAP INDEX: CONCEPTS
  • 17. © 2014 Pythian Confidential17 BITMAP INDEX SELECT OPERATION 17
  • 18. © 2014 Pythian Confidential18 BITMAP INDEX UPDATE OPERATION 18 row#0[8005] flag: ------, lock: 0, len=27 col 0; len 6; (6): 43 61 6e 61 64 61 col 1; len 6; (6): 01 80 00 83 00 00 col 2; len 6; (6): 01 80 00 83 00 0f col 3; len 3; (3): c9 0c 03 row#1[7886] flag: ------, lock: 2, len=35 col 0; len 9; (9): 47 55 41 54 45 4d 41 4c 41vkey=GUATEMALA col 1; len 6; (6): 00 00 00 00 00 00 Beginning of ROWIDs col 2; len 6; (6): 01 80 00 83 00 0f Ending of ROWIDs col 3; len 8; (8): f9 91 df 80 dc 08 61 08 Bitmap String row#2[7975] flag: ---D--, lock: 2, len=30 col 0; len 9; (9): 47 75 61 74 65 6d 61 6c 61vkey=Guatemala col 1; len 6; (6): 01 80 00 83 00 00 Beginning of ROWIDs col 2; len 6; (6): 01 80 00 83 00 0f Ending of ROWIDs col 3; len 3; (3): c9 61 08 Bitmap String row#3[7948] flag: ------, lock: 0, len=27 col 0; len 6; (6): 4d 65 78 69 63 6f col 1; len 6; (6): 01 80 00 83 00 00 col 2; len 6; (6): 01 80 00 83 00 0f col 3; len 3; (3): c9 92 04 ----- end of leaf block dump ----- update ioug.t1 set vkey='GUATEMALA' where vkey='Guatemala';
  • 19. © 2014 Pythian Confidential19 BITMAP INDEX INSERT OPERATION • If the KEY exists: – The Bitmap String is updated • If the KEY doesn’t exist – A new Bitmap Entry is created with its own Bitmap String 19
  • 20. © 2014 Pythian Confidential20 BITMAP INDEX DELETE OPERATION • If after the deletion there are some rows with the KEY afer the DELETE operation, then the Index is not marked as deleted and only the Bitmap String is updated with “0” in the positions where our deleted rows were stored. • If after delete there is no any row with the KEY after the DELETE operatioN, then the Index Entry is marked as deleted with “--D--” 20 row#2[7975] flag: ---D--, lock: 2, len=30 Before--> Delete Op--> After--> Before--> After-->
  • 21. © 2014 Pythian Confidential21 21 FUNCTION-BASED INDEXES
  • 22. © 2014 Pythian Confidential22 FUNCTION-BASED INDEX 22 create index functionbasedIDX on dgomez(upper(value)); insert into dgomez values (1,'deiby'); Leaf block dump =============== ….. ….. row#0[8017] flag: ------, lock: 0, len=15 col 0; len 5; (5): 44 45 49 42 59 ’DEIBY’(not ‘deiby’) col 1; len 6; (6): 01 40 00 83 00 00 ----- end of leaf block dump ----- • The same B-Tree structure and • The same behavior than B-Tree Indexes but with the values stored with the function applied.
  • 23. © 2014 Pythian Confidential23 23 REVERSED-KEY INDEXES
  • 24. © 2014 Pythian Confidential24 REVERSED-KEY INDEX 24 • The same B-Tree structure and • Every byte of the KEY is reversed . create index reversekeyIDX on dgomez(value) reverse; • 204 • 205 • 206 • 207 • 402 • 502 • 602 • 702
  • 25. © 2014 Pythian Confidential25 REVERSED-KEY INDEX 25 • The same B-Tree structure and • Every byte of the KEY is reversed . create index reversekeyIDX on dgomez(value) reverse; row#0[8019] flag: ------, lock: 0, len=13 col 0; len 3; (3): 34 30 32<-The value col 1; len 6; (6): 02 40 00 87 00 04<-RowID row#1[8006] flag: ------, lock: 0, len=13 col 0; len 3; (3): 35 30 32 col 1; len 6; (6): 02 40 00 87 00 05 row#2[7993] flag: ------, lock: 0, len=13 col 0; len 3; (3): 36 30 32 col 1; len 6; (6): 02 40 00 87 00 06 row#3[7980] flag: ------, lock: 0, len=13 col 0; len 3; (3): 37 30 32 col 1; len 6; (6): 02 40 00 87 00 07 ----- end of leaf block dump ----- 34 30 32 => 4 0 2 35 30 32 => 5 0 2 36 30 32 => 6 0 2 37 30 32 => 7 0 2 But not… 204 205 206 207
  • 26. © 2014 Pythian Confidential26 26 INDEXES ON VIRTUAL COLUMNS
  • 27. © 2014 Pythian Confidential27 INDEXES ON VIRTUAL COLUMNS 27 create table dgomez( value1 varchar(10), value2 varchar2(10), result as (value1||value2)); row#0[8017] flag: ------, lock: 0, len=15 col 0; len 5; (5): 64 65 69 62 79 <--deiby col 1; len 6; (6): 01 40 00 87 00 00 <---ROWID ----- end of leaf block dump ----- create index vcolumn on dgomez(result); insert into dgomez (value1,value2) values ('dei','by'); • The same B-Tree structure • The dynamic value of KEY is stored physically. • A change on dependent column will update the Index
  • 28. © 2014 Pythian Confidential28