SlideShare a Scribd company logo
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

More Related Content

PPTX
Nosql databases
ateeq ateeq
Ā 
ODP
Partitioning
Reema Gajjar
Ā 
PPTX
Sql fundamentals
Ravinder Kamboj
Ā 
PPTX
introdution to SQL and SQL functions
farwa waqar
Ā 
PPTX
SQL Joins.pptx
Ankit Rai
Ā 
PDF
UNIT 3- DATABASE INTEGRITY AND SECURITY CONCEPTS (1).pdf
KavitaShinde26
Ā 
PDF
SQL Functions and Operators
Mohan Kumar.R
Ā 
PDF
Relational database- Fundamentals
Mohammed El Hedhly
Ā 
Nosql databases
ateeq ateeq
Ā 
Partitioning
Reema Gajjar
Ā 
Sql fundamentals
Ravinder Kamboj
Ā 
introdution to SQL and SQL functions
farwa waqar
Ā 
SQL Joins.pptx
Ankit Rai
Ā 
UNIT 3- DATABASE INTEGRITY AND SECURITY CONCEPTS (1).pdf
KavitaShinde26
Ā 
SQL Functions and Operators
Mohan Kumar.R
Ā 
Relational database- Fundamentals
Mohammed El Hedhly
Ā 

What's hot (20)

PPT
Database performance tuning and query optimization
Dhani Ahmad
Ā 
PPTX
SQL Basics
Hammad Rasheed
Ā 
DOCX
Index in sql server
Durgaprasad Yadav
Ā 
DOC
SQL
Shunya Ram
Ā 
PPTX
Data warehouse architecture
janani thirupathi
Ā 
PPT
Joins in SQL
Vigneshwaran Sankaran
Ā 
PPTX
Introduction to database & sql
zahid6
Ā 
PDF
Big Data Ecosystem
Lucian Neghina
Ā 
PPTX
User, roles and privileges
Yogiji Creations
Ā 
PPTX
SQL Join Basic
Naimul Arif
Ā 
PPTX
The Relational Database Model
Shishir Aryal
Ā 
PDF
Lesson 1: Introduction to DBMS
Amrit Kaur
Ā 
PDF
View & index in SQL
Swapnali Pawar
Ā 
PPTX
Database security
MaryamAsghar9
Ā 
PPT
Hive(ppt)
Abhinav Tyagi
Ā 
PPTX
Introduction of sql server indexing
Mahabubur Rahaman
Ā 
PPTX
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
Ā 
PPTX
Nested queries in database
Satya P. Joshi
Ā 
PPSX
Oracle Table Partitioning - Introduction
MyOnlineITCourses
Ā 
Database performance tuning and query optimization
Dhani Ahmad
Ā 
SQL Basics
Hammad Rasheed
Ā 
Index in sql server
Durgaprasad Yadav
Ā 
SQL
Shunya Ram
Ā 
Data warehouse architecture
janani thirupathi
Ā 
Joins in SQL
Vigneshwaran Sankaran
Ā 
Introduction to database & sql
zahid6
Ā 
Big Data Ecosystem
Lucian Neghina
Ā 
User, roles and privileges
Yogiji Creations
Ā 
SQL Join Basic
Naimul Arif
Ā 
The Relational Database Model
Shishir Aryal
Ā 
Lesson 1: Introduction to DBMS
Amrit Kaur
Ā 
View & index in SQL
Swapnali Pawar
Ā 
Database security
MaryamAsghar9
Ā 
Hive(ppt)
Abhinav Tyagi
Ā 
Introduction of sql server indexing
Mahabubur Rahaman
Ā 
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
Ā 
Nested queries in database
Satya P. Joshi
Ā 
Oracle Table Partitioning - Introduction
MyOnlineITCourses
Ā 
Ad

Viewers also liked (20)

PDF
A Main Memory Index Structure to Query Linked Data
Olaf Hartig
Ā 
PPTX
8. transactions
Amrit Kaur
Ā 
PPTX
11. using regular expressions with oracle database
Amrit Kaur
Ā 
PDF
LUTI Formula
Dr Cole Hendrigan
Ā 
PPTX
7. exceptions handling in pl
Amrit Kaur
Ā 
PPTX
12. oracle database architecture
Amrit Kaur
Ā 
PPTX
10. timestamp
Amrit Kaur
Ā 
PPTX
3. ddl create
Amrit Kaur
Ā 
PDF
ADT - TBWAYoungBucs 2013 - Strategic recommendation
Basile Viault
Ā 
PDF
Database Management System
Abishek V S
Ā 
PPT
Emerging database technology multimedia database
Salama Al Busaidi
Ā 
PPTX
2. DML_INSERT_DELETE_UPDATE
Amrit Kaur
Ā 
PDF
Business Integration for the 21st Century
Bob Rhubart
Ā 
PPTX
The History of ADT
yourlocalsecurity
Ā 
PPTX
B tree
Tech_MX
Ā 
PDF
MySQL Query And Index Tuning
Manikanda kumar
Ā 
PDF
Trees, Binary Search Tree, AVL Tree in Data Structures
Gurukul Kangri Vishwavidyalaya - Faculty of Engineering and Technology
Ā 
PPT
Types dbms
Avnish Shaw
Ā 
PPTX
DEMOLITION OF STRUCTURE BY ABHINAV RAWAT
Abhinav Rawat
Ā 
PPTX
Debugging Effectively - PHP UK 2017
Colin O'Dell
Ā 
A Main Memory Index Structure to Query Linked Data
Olaf Hartig
Ā 
8. transactions
Amrit Kaur
Ā 
11. using regular expressions with oracle database
Amrit Kaur
Ā 
LUTI Formula
Dr Cole Hendrigan
Ā 
7. exceptions handling in pl
Amrit Kaur
Ā 
12. oracle database architecture
Amrit Kaur
Ā 
10. timestamp
Amrit Kaur
Ā 
3. ddl create
Amrit Kaur
Ā 
ADT - TBWAYoungBucs 2013 - Strategic recommendation
Basile Viault
Ā 
Database Management System
Abishek V S
Ā 
Emerging database technology multimedia database
Salama Al Busaidi
Ā 
2. DML_INSERT_DELETE_UPDATE
Amrit Kaur
Ā 
Business Integration for the 21st Century
Bob Rhubart
Ā 
The History of ADT
yourlocalsecurity
Ā 
B tree
Tech_MX
Ā 
MySQL Query And Index Tuning
Manikanda kumar
Ā 
Trees, Binary Search Tree, AVL Tree in Data Structures
Gurukul Kangri Vishwavidyalaya - Faculty of Engineering and Technology
Ā 
Types dbms
Avnish Shaw
Ā 
DEMOLITION OF STRUCTURE BY ABHINAV RAWAT
Abhinav Rawat
Ā 
Debugging Effectively - PHP UK 2017
Colin O'Dell
Ā 
Ad

Similar to 9. index and index organized table (20)

PPTX
Sql server ___________session_17(indexes)
Ehtisham Ali
Ā 
PPTX
Lecture 17 (Week 11) - MYSQL INDEXES.pptx
motivationalvideos54
Ā 
PPTX
Sql performance tuning
Leo Mark Villar
Ā 
PPTX
Data structures - unit 1
SaranyaP45
Ā 
PDF
Database Indexes
Sperasoft
Ā 
PPTX
File Organization in database management.pptx
ubaidullah75790
Ā 
PPT
Lecture12 abap on line
Milind Patil
Ā 
PDF
Indexing techniques
Huda Alameen
Ā 
PPTX
dotnetMALAGA - Sql query tuning guidelines
Javier GarcĆ­a Magna
Ā 
PDF
Indexing and-hashing
Ami Ranjit
Ā 
PPTX
unit 1.pptx for advanced cloud computing unit
akastiyan23
Ā 
PPT
Mysql Optimization
Navneet Kumar
Ā 
PPTX
SAG_Indexing and Query Optimization
Vaibhav Jain
Ā 
PDF
DBMS and SQL Questions and Answers (1).pdf
sifatullah42
Ā 
PDF
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
Polish SQL Server User Group
Ā 
PPTX
Database_Indexing_AND ITTS TYPES PRESENTATION
polin38
Ā 
PPTX
Database tables
HasanUYANIK2
Ā 
PPT
9223301.ppt
KalsoomTahir2
Ā 
PPT
lecture 02.2.ppt
NathanielAdika
Ā 
PDF
Relational databases.pdf
chandiruirene
Ā 
Sql server ___________session_17(indexes)
Ehtisham Ali
Ā 
Lecture 17 (Week 11) - MYSQL INDEXES.pptx
motivationalvideos54
Ā 
Sql performance tuning
Leo Mark Villar
Ā 
Data structures - unit 1
SaranyaP45
Ā 
Database Indexes
Sperasoft
Ā 
File Organization in database management.pptx
ubaidullah75790
Ā 
Lecture12 abap on line
Milind Patil
Ā 
Indexing techniques
Huda Alameen
Ā 
dotnetMALAGA - Sql query tuning guidelines
Javier GarcĆ­a Magna
Ā 
Indexing and-hashing
Ami Ranjit
Ā 
unit 1.pptx for advanced cloud computing unit
akastiyan23
Ā 
Mysql Optimization
Navneet Kumar
Ā 
SAG_Indexing and Query Optimization
Vaibhav Jain
Ā 
DBMS and SQL Questions and Answers (1).pdf
sifatullah42
Ā 
SQLDay2013_Denny Cherry - Table indexing for the .NET Developer
Polish SQL Server User Group
Ā 
Database_Indexing_AND ITTS TYPES PRESENTATION
polin38
Ā 
Database tables
HasanUYANIK2
Ā 
9223301.ppt
KalsoomTahir2
Ā 
lecture 02.2.ppt
NathanielAdika
Ā 
Relational databases.pdf
chandiruirene
Ā 

More from Amrit Kaur (20)

PDF
File Organization
Amrit Kaur
Ā 
PDF
Introduction to transaction processing
Amrit Kaur
Ā 
PDF
ER diagram
Amrit Kaur
Ā 
PPTX
Transaction Processing
Amrit Kaur
Ā 
PDF
Normalization
Amrit Kaur
Ā 
PDF
Sample Interview Question
Amrit Kaur
Ā 
PPTX
6. triggers
Amrit Kaur
Ā 
PPTX
5. stored procedure and functions
Amrit Kaur
Ā 
PPTX
4. plsql
Amrit Kaur
Ā 
PPTX
1. dml select statement reterive data
Amrit Kaur
Ā 
PDF
Chapter 8 Inheritance
Amrit Kaur
Ā 
PDF
Chapter 7 C++ As OOP
Amrit Kaur
Ā 
PDF
Chapter 6 OOPS Concept
Amrit Kaur
Ā 
PDF
ComputerBasics
Amrit Kaur
Ā 
PDF
Security and Viruses
Amrit Kaur
Ā 
DOCX
Chapter 5
Amrit Kaur
Ā 
DOCX
Chapter 4
Amrit Kaur
Ā 
PDF
Chapter 3
Amrit Kaur
Ā 
PDF
Chapter 2: Conditional Construct in C++
Amrit Kaur
Ā 
PDF
C++ Tokens
Amrit Kaur
Ā 
File Organization
Amrit Kaur
Ā 
Introduction to transaction processing
Amrit Kaur
Ā 
ER diagram
Amrit Kaur
Ā 
Transaction Processing
Amrit Kaur
Ā 
Normalization
Amrit Kaur
Ā 
Sample Interview Question
Amrit Kaur
Ā 
6. triggers
Amrit Kaur
Ā 
5. stored procedure and functions
Amrit Kaur
Ā 
4. plsql
Amrit Kaur
Ā 
1. dml select statement reterive data
Amrit Kaur
Ā 
Chapter 8 Inheritance
Amrit Kaur
Ā 
Chapter 7 C++ As OOP
Amrit Kaur
Ā 
Chapter 6 OOPS Concept
Amrit Kaur
Ā 
ComputerBasics
Amrit Kaur
Ā 
Security and Viruses
Amrit Kaur
Ā 
Chapter 5
Amrit Kaur
Ā 
Chapter 4
Amrit Kaur
Ā 
Chapter 3
Amrit Kaur
Ā 
Chapter 2: Conditional Construct in C++
Amrit Kaur
Ā 
C++ Tokens
Amrit Kaur
Ā 

Recently uploaded (20)

PDF
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
Ā 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
Ā 
PPTX
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
Ā 
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
Ā 
PPTX
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
Ā 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
Ā 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
Ā 
PPTX
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
Ā 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
Ā 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
Ā 
PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
Ā 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
Ā 
PPTX
How to Apply for a Job From Odoo 18 Website
Celine George
Ā 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
Ā 
PPTX
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
Ā 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
Ā 
PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
Ā 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
Ā 
PPTX
A Smarter Way to Think About Choosing a College
Cyndy McDonald
Ā 
PPTX
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
Ā 
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
Ā 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
Ā 
20250924 Navigating the Future: How to tell the difference between an emergen...
McGuinness Institute
Ā 
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
Ā 
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
Ā 
Virat Kohli- the Pride of Indian cricket
kushpar147
Ā 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
Ā 
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
Ā 
Review of Related Literature & Studies.pdf
Thelma Villaflores
Ā 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
Ā 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
Ā 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
Ā 
How to Apply for a Job From Odoo 18 Website
Celine George
Ā 
Basics and rules of probability with real-life uses
ravatkaran694
Ā 
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
Ā 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
Ā 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
Ā 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
Ā 
A Smarter Way to Think About Choosing a College
Cyndy McDonald
Ā 
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
Ā 

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

Editor's Notes

  • #7: Unique :- empno Non Unique index on first name