SlideShare une entreprise Scribd logo
1  sur  17
Creating and Managing Indexes
What is and Index?
• It is a data structure associated with a table
that enables fast searching of data.
• Indexes are schema objects that are logically
and physically independent of the data in the
objects with which they are associated.
• Indexes are structures stored in the database
that users manage using SQL statements.
What is an Index?
• Primary and unique keys automatically have
indexes, but create an index on a foreign key.
• Index must be created on the most frequently
columns in the table.
• Oracle Database does not index table rows in
which all key columns are null.
What is an Index?
• An index contains a collection of keys and
pointers.
– Keys are values built from one or more columns in
the table
– Pointer stores the address of the location where a
data block stored in the memory.
What is an Index?
• Composite Index
– Index based on one or more columns is called
composite index.
– Multiple indexes can exist for the same table if the
permutation of columns differs for each index.
What is an Index?
• Unique Indexes
– Unique indexes guarantee that no two rows of a
table have duplicate values in the key column or
columns.
– The data is sorted only by key.
• Non Unique Indexes
– Nonunique indexes permit duplicates values in the
indexed column or columns.
– The rowid is included in the key in sorted order
Types of Indexes
• B-tree Indexes
• Bitwise Indexes
• Function Based Indexes
• ALL_INDEXES view is used to list all the
indexes details.
Types of Indexes
• B-tree Indexes
– These indexes are the standard (NORMAL) index
type.
– They are excellent for primary key and highly-
selective indexes.
– Order list of values divided into ranges.
CREATE INDEX indexname
ON table_name(column)list);
Types of Indexes
• Bitmap Index
– In a bitmap index, the database stores a bitmap
for each index key.
– Used for the columns when the number of distinct
values is small compared to the number of table
rows.
CREATE BITMAP INDEX index_name
ON table_name (column_name);
Value Row 1 Row 2 Row 3 Row 4 Row 5 Row 6 Row 7 Row 8
Male 1 1 0 1 0 1 0 1
Female 0 0 1 0 1 0 1 0
Function Based Index
• Function Based Index
– A function-based index computes the value of a
function or expression involving one or more
columns and stores it in the index.
– A function-based index can be either a B-tree or a
bitmap index.
CREATE INDEX index_name
ON tablename (expression(s) [, column_list]);
Function Based Index
• Function Based Index
– The database only uses the function-based index
when the function is included in a query not at
INSERT or UPDATE statement.
Index Organised Tables
• An index-organized table is a table stored in a
variation of a B-tree index structure.
• In an index-organized table, rows are stored in
an index defined on the primary key for the
table.
• An index-organized table stores all data in the
same structure and does not need to store the
rowid.
Heap Organised vs Index Organised Tables
• In heap organised table,
– the rowid uniquely identifies a row.
– Primary key constraint may optionally be defined.
• In Index organised table,
– Primary key uniquely identifies a row.
– Primary key constraint must be defined.
Heap Organised vs Index Organised Tables
• In heap organised table,
– Individual rows may be accessed directly by rowid.
• In Index organised table
– Access to individual rows may be achieved
indirectly by primary
Heap Organised vs Index Organised Tables
• In heap organised table, can contain a column
of the LONG data type and LOB data types.
• In Index organised table, can contain LOB
columns but not LONG columns.
Heap Organised vs Index Organised Tables
• Heap organised Table
Heap Organised vs Index Organised Tables
• Indexed organised Table

Contenu connexe

Tendances

Introduction of sql server indexing
Introduction of sql server indexingIntroduction of sql server indexing
Introduction of sql server indexingMahabubur Rahaman
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)Ishucs
 
Lecture 4 sql {basics keys and constraints}
Lecture 4 sql {basics  keys and constraints}Lecture 4 sql {basics  keys and constraints}
Lecture 4 sql {basics keys and constraints}Shubham Shukla
 
5. stored procedure and functions
5. stored procedure and functions5. stored procedure and functions
5. stored procedure and functionsAmrit Kaur
 
SQL Joins With Examples | Edureka
SQL Joins With Examples | EdurekaSQL Joins With Examples | Edureka
SQL Joins With Examples | EdurekaEdureka!
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredDanish Mehraj
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query OptimizationBrian Gallagher
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)Sabana Maharjan
 
Indexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cIndexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cOren Nakdimon
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts Bharat Kalia
 
Sql – Structured Query Language
Sql – Structured Query LanguageSql – Structured Query Language
Sql – Structured Query Languagepandey3045_bit
 

Tendances (20)

SQL
SQLSQL
SQL
 
Introduction of sql server indexing
Introduction of sql server indexingIntroduction of sql server indexing
Introduction of sql server indexing
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
Sql(structured query language)
Sql(structured query language)Sql(structured query language)
Sql(structured query language)
 
Lecture 4 sql {basics keys and constraints}
Lecture 4 sql {basics  keys and constraints}Lecture 4 sql {basics  keys and constraints}
Lecture 4 sql {basics keys and constraints}
 
5. stored procedure and functions
5. stored procedure and functions5. stored procedure and functions
5. stored procedure and functions
 
SQL Joins With Examples | Edureka
SQL Joins With Examples | EdurekaSQL Joins With Examples | Edureka
SQL Joins With Examples | Edureka
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
SQL Joins and Query Optimization
SQL Joins and Query OptimizationSQL Joins and Query Optimization
SQL Joins and Query Optimization
 
Introduction to structured query language (sql)
Introduction to structured query language (sql)Introduction to structured query language (sql)
Introduction to structured query language (sql)
 
SQL JOIN
SQL JOINSQL JOIN
SQL JOIN
 
MySQL Views
MySQL ViewsMySQL Views
MySQL Views
 
Indexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12cIndexes and Indexing in Oracle 12c
Indexes and Indexing in Oracle 12c
 
PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts PL/SQL Introduction and Concepts
PL/SQL Introduction and Concepts
 
Trigger
TriggerTrigger
Trigger
 
Sql subquery
Sql  subquerySql  subquery
Sql subquery
 
Sql commands
Sql commandsSql commands
Sql commands
 
Sql
SqlSql
Sql
 
Sql – Structured Query Language
Sql – Structured Query LanguageSql – Structured Query Language
Sql – Structured Query Language
 

En vedette

A Main Memory Index Structure to Query Linked Data
A Main Memory Index Structure to Query Linked DataA Main Memory Index Structure to Query Linked Data
A Main Memory Index Structure to Query Linked DataOlaf Hartig
 
8. transactions
8. transactions8. transactions
8. transactionsAmrit Kaur
 
11. using regular expressions with oracle database
11. using regular expressions with oracle database11. using regular expressions with oracle database
11. using regular expressions with oracle databaseAmrit Kaur
 
7. exceptions handling in pl
7. exceptions handling in pl7. exceptions handling in pl
7. exceptions handling in plAmrit Kaur
 
12. oracle database architecture
12. oracle database architecture12. oracle database architecture
12. oracle database architectureAmrit Kaur
 
ADT - TBWAYoungBucs 2013 - Strategic recommendation
ADT - TBWAYoungBucs 2013 - Strategic recommendationADT - TBWAYoungBucs 2013 - Strategic recommendation
ADT - TBWAYoungBucs 2013 - Strategic recommendationBasile Viault
 
Database Management System
Database Management SystemDatabase Management System
Database Management SystemAbishek V S
 
Emerging database technology multimedia database
Emerging database technology   multimedia databaseEmerging database technology   multimedia database
Emerging database technology multimedia databaseSalama Al Busaidi
 
2. DML_INSERT_DELETE_UPDATE
2. DML_INSERT_DELETE_UPDATE2. DML_INSERT_DELETE_UPDATE
2. DML_INSERT_DELETE_UPDATEAmrit Kaur
 
Business Integration for the 21st Century
Business Integration for the 21st Century Business Integration for the 21st Century
Business Integration for the 21st Century Bob Rhubart
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index TuningManikanda kumar
 
DEMOLITION OF STRUCTURE BY ABHINAV RAWAT
DEMOLITION OF STRUCTURE BY ABHINAV RAWATDEMOLITION OF STRUCTURE BY ABHINAV RAWAT
DEMOLITION OF STRUCTURE BY ABHINAV RAWATAbhinav Rawat
 
Debugging Effectively - PHP UK 2017
Debugging Effectively - PHP UK 2017Debugging Effectively - PHP UK 2017
Debugging Effectively - PHP UK 2017Colin O'Dell
 

En vedette (20)

A Main Memory Index Structure to Query Linked Data
A Main Memory Index Structure to Query Linked DataA Main Memory Index Structure to Query Linked Data
A Main Memory Index Structure to Query Linked Data
 
8. transactions
8. transactions8. transactions
8. transactions
 
11. using regular expressions with oracle database
11. using regular expressions with oracle database11. using regular expressions with oracle database
11. using regular expressions with oracle database
 
LUTI Formula
LUTI Formula LUTI Formula
LUTI Formula
 
7. exceptions handling in pl
7. exceptions handling in pl7. exceptions handling in pl
7. exceptions handling in pl
 
12. oracle database architecture
12. oracle database architecture12. oracle database architecture
12. oracle database architecture
 
10. timestamp
10. timestamp10. timestamp
10. timestamp
 
3. ddl create
3. ddl create3. ddl create
3. ddl create
 
ADT - TBWAYoungBucs 2013 - Strategic recommendation
ADT - TBWAYoungBucs 2013 - Strategic recommendationADT - TBWAYoungBucs 2013 - Strategic recommendation
ADT - TBWAYoungBucs 2013 - Strategic recommendation
 
Database Management System
Database Management SystemDatabase Management System
Database Management System
 
Emerging database technology multimedia database
Emerging database technology   multimedia databaseEmerging database technology   multimedia database
Emerging database technology multimedia database
 
2. DML_INSERT_DELETE_UPDATE
2. DML_INSERT_DELETE_UPDATE2. DML_INSERT_DELETE_UPDATE
2. DML_INSERT_DELETE_UPDATE
 
Business Integration for the 21st Century
Business Integration for the 21st Century Business Integration for the 21st Century
Business Integration for the 21st Century
 
The History of ADT
The History of ADTThe History of ADT
The History of ADT
 
B tree
B treeB tree
B tree
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index Tuning
 
Trees, Binary Search Tree, AVL Tree in Data Structures
Trees, Binary Search Tree, AVL Tree in Data Structures Trees, Binary Search Tree, AVL Tree in Data Structures
Trees, Binary Search Tree, AVL Tree in Data Structures
 
Types dbms
Types dbmsTypes dbms
Types dbms
 
DEMOLITION OF STRUCTURE BY ABHINAV RAWAT
DEMOLITION OF STRUCTURE BY ABHINAV RAWATDEMOLITION OF STRUCTURE BY ABHINAV RAWAT
DEMOLITION OF STRUCTURE BY ABHINAV RAWAT
 
Debugging Effectively - PHP UK 2017
Debugging Effectively - PHP UK 2017Debugging Effectively - PHP UK 2017
Debugging Effectively - PHP UK 2017
 

Similaire à 9. index and index organized table

Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)Ehtisham Ali
 
Data structures - unit 1
Data structures - unit 1Data structures - unit 1
Data structures - unit 1SaranyaP45
 
Database Indexes
Database IndexesDatabase Indexes
Database IndexesSperasoft
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on lineMilind Patil
 
Indexing techniques
Indexing techniquesIndexing techniques
Indexing techniquesHuda Alameen
 
dotnetMALAGA - Sql query tuning guidelines
dotnetMALAGA - Sql query tuning guidelinesdotnetMALAGA - Sql query tuning guidelines
dotnetMALAGA - Sql query tuning guidelinesJavier García Magna
 
Indexing and-hashing
Indexing and-hashingIndexing and-hashing
Indexing and-hashingAmi Ranjit
 
SAG_Indexing and Query Optimization
SAG_Indexing and Query OptimizationSAG_Indexing and Query Optimization
SAG_Indexing and Query OptimizationVaibhav Jain
 
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET DeveloperSQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET DeveloperPolish SQL Server User Group
 
Relational databases.pdf
Relational databases.pdfRelational databases.pdf
Relational databases.pdfchandiruirene
 
LINKED LIST.pptx
LINKED LIST.pptxLINKED LIST.pptx
LINKED LIST.pptxDr.Shweta
 

Similaire à 9. index and index organized table (20)

Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)
 
Sql performance tuning
Sql performance tuningSql performance tuning
Sql performance tuning
 
Data structures - unit 1
Data structures - unit 1Data structures - unit 1
Data structures - unit 1
 
Index in sql server
Index in sql serverIndex in sql server
Index in sql server
 
Database Indexes
Database IndexesDatabase Indexes
Database Indexes
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
 
Indexing techniques
Indexing techniquesIndexing techniques
Indexing techniques
 
dotnetMALAGA - Sql query tuning guidelines
dotnetMALAGA - Sql query tuning guidelinesdotnetMALAGA - Sql query tuning guidelines
dotnetMALAGA - Sql query tuning guidelines
 
Indexing and-hashing
Indexing and-hashingIndexing and-hashing
Indexing and-hashing
 
Mysql Optimization
Mysql OptimizationMysql Optimization
Mysql Optimization
 
SAG_Indexing and Query Optimization
SAG_Indexing and Query OptimizationSAG_Indexing and Query Optimization
SAG_Indexing and Query Optimization
 
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET DeveloperSQLDay2013_Denny Cherry - Table indexing for the .NET Developer
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
 
Database tables
Database tablesDatabase tables
Database tables
 
9223301.ppt
9223301.ppt9223301.ppt
9223301.ppt
 
lecture 02.2.ppt
lecture 02.2.pptlecture 02.2.ppt
lecture 02.2.ppt
 
Relational databases.pdf
Relational databases.pdfRelational databases.pdf
Relational databases.pdf
 
LINKED LIST.pptx
LINKED LIST.pptxLINKED LIST.pptx
LINKED LIST.pptx
 
What is a Database
What is a DatabaseWhat is a Database
What is a Database
 
ds bridge.pptx
ds bridge.pptxds bridge.pptx
ds bridge.pptx
 
Statistics and Indexes Internals
Statistics and Indexes InternalsStatistics and Indexes Internals
Statistics and Indexes Internals
 

Plus de Amrit Kaur

File Organization
File OrganizationFile Organization
File OrganizationAmrit Kaur
 
Introduction to transaction processing
Introduction to transaction processingIntroduction to transaction processing
Introduction to transaction processingAmrit Kaur
 
Transaction Processing
Transaction ProcessingTransaction Processing
Transaction ProcessingAmrit Kaur
 
Sample Interview Question
Sample Interview QuestionSample Interview Question
Sample Interview QuestionAmrit Kaur
 
1. dml select statement reterive data
1. dml select statement reterive data1. dml select statement reterive data
1. dml select statement reterive dataAmrit Kaur
 
Chapter 8 Inheritance
Chapter 8 InheritanceChapter 8 Inheritance
Chapter 8 InheritanceAmrit Kaur
 
Chapter 7 C++ As OOP
Chapter 7 C++ As OOPChapter 7 C++ As OOP
Chapter 7 C++ As OOPAmrit Kaur
 
Chapter 6 OOPS Concept
Chapter 6 OOPS ConceptChapter 6 OOPS Concept
Chapter 6 OOPS ConceptAmrit Kaur
 
ComputerBasics
ComputerBasicsComputerBasics
ComputerBasicsAmrit Kaur
 
Security and Viruses
Security and VirusesSecurity and Viruses
Security and VirusesAmrit Kaur
 
Chapter 2: Conditional Construct in C++
Chapter 2: Conditional Construct in C++Chapter 2: Conditional Construct in C++
Chapter 2: Conditional Construct in C++Amrit Kaur
 
Lesson 1: Introduction to DBMS
Lesson 1: Introduction to DBMSLesson 1: Introduction to DBMS
Lesson 1: Introduction to DBMSAmrit Kaur
 

Plus de Amrit Kaur (20)

File Organization
File OrganizationFile Organization
File Organization
 
Introduction to transaction processing
Introduction to transaction processingIntroduction to transaction processing
Introduction to transaction processing
 
ER diagram
ER diagramER diagram
ER diagram
 
Transaction Processing
Transaction ProcessingTransaction Processing
Transaction Processing
 
Normalization
NormalizationNormalization
Normalization
 
Sample Interview Question
Sample Interview QuestionSample Interview Question
Sample Interview Question
 
6. triggers
6. triggers6. triggers
6. triggers
 
4. plsql
4. plsql4. plsql
4. plsql
 
1. dml select statement reterive data
1. dml select statement reterive data1. dml select statement reterive data
1. dml select statement reterive data
 
Chapter 8 Inheritance
Chapter 8 InheritanceChapter 8 Inheritance
Chapter 8 Inheritance
 
Chapter 7 C++ As OOP
Chapter 7 C++ As OOPChapter 7 C++ As OOP
Chapter 7 C++ As OOP
 
Chapter 6 OOPS Concept
Chapter 6 OOPS ConceptChapter 6 OOPS Concept
Chapter 6 OOPS Concept
 
ComputerBasics
ComputerBasicsComputerBasics
ComputerBasics
 
Security and Viruses
Security and VirusesSecurity and Viruses
Security and Viruses
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Chapter 2: Conditional Construct in C++
Chapter 2: Conditional Construct in C++Chapter 2: Conditional Construct in C++
Chapter 2: Conditional Construct in C++
 
C++ Tokens
C++ TokensC++ Tokens
C++ Tokens
 
Lesson 1: Introduction to DBMS
Lesson 1: Introduction to DBMSLesson 1: Introduction to DBMS
Lesson 1: Introduction to DBMS
 

Dernier

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 

Dernier (20)

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 

9. index and index organized table

  • 2. What is and Index? • It is a data structure associated with a table that enables fast searching of data. • Indexes are schema objects that are logically and physically independent of the data in the objects with which they are associated. • Indexes are structures stored in the database that users manage using SQL statements.
  • 3. What is an Index? • Primary and unique keys automatically have indexes, but create an index on a foreign key. • Index must be created on the most frequently columns in the table. • Oracle Database does not index table rows in which all key columns are null.
  • 4. What is an Index? • An index contains a collection of keys and pointers. – Keys are values built from one or more columns in the table – Pointer stores the address of the location where a data block stored in the memory.
  • 5. What is an Index? • Composite Index – Index based on one or more columns is called composite index. – Multiple indexes can exist for the same table if the permutation of columns differs for each index.
  • 6. What is an Index? • Unique Indexes – Unique indexes guarantee that no two rows of a table have duplicate values in the key column or columns. – The data is sorted only by key. • Non Unique Indexes – Nonunique indexes permit duplicates values in the indexed column or columns. – The rowid is included in the key in sorted order
  • 7. Types of Indexes • B-tree Indexes • Bitwise Indexes • Function Based Indexes • ALL_INDEXES view is used to list all the indexes details.
  • 8. Types of Indexes • B-tree Indexes – These indexes are the standard (NORMAL) index type. – They are excellent for primary key and highly- selective indexes. – Order list of values divided into ranges. CREATE INDEX indexname ON table_name(column)list);
  • 9. Types of Indexes • Bitmap Index – In a bitmap index, the database stores a bitmap for each index key. – Used for the columns when the number of distinct values is small compared to the number of table rows. CREATE BITMAP INDEX index_name ON table_name (column_name); Value Row 1 Row 2 Row 3 Row 4 Row 5 Row 6 Row 7 Row 8 Male 1 1 0 1 0 1 0 1 Female 0 0 1 0 1 0 1 0
  • 10. Function Based Index • Function Based Index – A function-based index computes the value of a function or expression involving one or more columns and stores it in the index. – A function-based index can be either a B-tree or a bitmap index. CREATE INDEX index_name ON tablename (expression(s) [, column_list]);
  • 11. Function Based Index • Function Based Index – The database only uses the function-based index when the function is included in a query not at INSERT or UPDATE statement.
  • 12. Index Organised Tables • An index-organized table is a table stored in a variation of a B-tree index structure. • In an index-organized table, rows are stored in an index defined on the primary key for the table. • An index-organized table stores all data in the same structure and does not need to store the rowid.
  • 13. Heap Organised vs Index Organised Tables • In heap organised table, – the rowid uniquely identifies a row. – Primary key constraint may optionally be defined. • In Index organised table, – Primary key uniquely identifies a row. – Primary key constraint must be defined.
  • 14. Heap Organised vs Index Organised Tables • In heap organised table, – Individual rows may be accessed directly by rowid. • In Index organised table – Access to individual rows may be achieved indirectly by primary
  • 15. Heap Organised vs Index Organised Tables • In heap organised table, can contain a column of the LONG data type and LOB data types. • In Index organised table, can contain LOB columns but not LONG columns.
  • 16. Heap Organised vs Index Organised Tables • Heap organised Table
  • 17. Heap Organised vs Index Organised Tables • Indexed organised Table

Notes de l'éditeur

  1. Unique :- empno Non Unique index on first name