SlideShare a Scribd company logo
1 of 6
Index Management
Database Administration and Management
Need of Index
When we run query (Select marks from student where marks <33);
OR
When we run query (Select sale from employee where salary <5000);
 Frequently verifying conditions
 Frequently assessing
 Assessing multiple records
Index
 Index maintains column data in ascending order
 It also maintain addresses
Why we use Index
 Decrease no. of verification
 Save time
 Better performance
Example
Roll_No Name Marks Address Roll_No Marks
1 Ali 45 BWP 5 22
2 Usama 87 LHR 6 30
3 Usman 48 BWP 1 45
4 Ahmed 64 BWP 3 48
5 Amir 22 BWP 4 64
6 Umer 30 LHR 2 87
Types of Index
 Simple Index
 Composite Index
 Unique Index
 Reversing Index
 Function based Index
 Bitmap Index
Simple Index
 Index create on single column. e.g., sale from employee table ,marks from
student table, etc.
Query
 Create INDEX IDX_SALARY on employee(sale);
 Searching in index, not table
Composite Index
 Index creates on multiple columns on any table.
Query
 Create INDEX idx_s.no_rollNo on students(s.no, rollNo);
Unique Index
 Index creates on columns ----- no duplication
Query
 Create UNIQUE INDEX idx_mobileNo on customers_dtls(mobile);
Reversing Index
 Want to search data frequently looking for highest value.
 Normally List values------- beginning, Highest value---------ending
 Its searching is fast because its work in reversing order.
 Based on Binary tree.------ right to left in b.tree.
 Create INDEX idx_sales_amt on sales(sales_amt) REVERSE;
Function based index
 Work on function based.
 Suppose I have a table of employee, and have a column of emp_id,salary,commission
Query
 Select e_id,sal(0.100*sal) from emp
 Create Index idx_sal on emp(sal(0.100*sal))init cap(ename);
Bitmap index
 Bits --------- 0,1
 Less number of values in columns
 E.g.,
 status--active/inactive,
 Gender--male/female
Query
 Create bitmap Index id_gender on customer(gender);
Note:
 All index created based on the binary tree index.

More Related Content

Similar to Index and types of Index used in Oracle.pptx

Clase 12 manejo indices modificada
Clase 12 manejo indices   modificadaClase 12 manejo indices   modificada
Clase 12 manejo indices modificada
Titiushko Jazz
 
Clase 12 manejo indices modificada
Clase 12 manejo indices   modificadaClase 12 manejo indices   modificada
Clase 12 manejo indices modificada
Titiushko Jazz
 
Sydney Oracle Meetup - indexes
Sydney Oracle Meetup - indexesSydney Oracle Meetup - indexes
Sydney Oracle Meetup - indexes
paulguerin
 
Benefits of using MongoDB: Reduce Complexity & Adapt to Changes
Benefits of using MongoDB: Reduce Complexity & Adapt to ChangesBenefits of using MongoDB: Reduce Complexity & Adapt to Changes
Benefits of using MongoDB: Reduce Complexity & Adapt to Changes
Alex Nguyen
 

Similar to Index and types of Index used in Oracle.pptx (20)

Tunning sql query
Tunning sql queryTunning sql query
Tunning sql query
 
Introduction to Databases - query optimizations for MySQL
Introduction to Databases - query optimizations for MySQLIntroduction to Databases - query optimizations for MySQL
Introduction to Databases - query optimizations for MySQL
 
Data Manipulation Language.pptx
Data Manipulation Language.pptxData Manipulation Language.pptx
Data Manipulation Language.pptx
 
How mysql choose the execution plan
How mysql choose the execution planHow mysql choose the execution plan
How mysql choose the execution plan
 
Clase 12 manejo indices modificada
Clase 12 manejo indices   modificadaClase 12 manejo indices   modificada
Clase 12 manejo indices modificada
 
Clase 12 manejo indices modificada
Clase 12 manejo indices   modificadaClase 12 manejo indices   modificada
Clase 12 manejo indices modificada
 
unit 4,Indexes in database.docx
unit 4,Indexes in database.docxunit 4,Indexes in database.docx
unit 4,Indexes in database.docx
 
SQL Lesson 6 - Select.pdf
SQL Lesson 6 - Select.pdfSQL Lesson 6 - Select.pdf
SQL Lesson 6 - Select.pdf
 
MySQL for beginners
MySQL for beginnersMySQL for beginners
MySQL for beginners
 
sql language
sql languagesql language
sql language
 
Mentor Your Indexes
Mentor Your IndexesMentor Your Indexes
Mentor Your Indexes
 
SQL Tunning
SQL TunningSQL Tunning
SQL Tunning
 
Module08
Module08Module08
Module08
 
Module08
Module08Module08
Module08
 
Sydney Oracle Meetup - indexes
Sydney Oracle Meetup - indexesSydney Oracle Meetup - indexes
Sydney Oracle Meetup - indexes
 
Database index
Database indexDatabase index
Database index
 
Sql server 2016 queries
Sql server 2016 queriesSql server 2016 queries
Sql server 2016 queries
 
Benefits of using MongoDB: Reduce Complexity & Adapt to Changes
Benefits of using MongoDB: Reduce Complexity & Adapt to ChangesBenefits of using MongoDB: Reduce Complexity & Adapt to Changes
Benefits of using MongoDB: Reduce Complexity & Adapt to Changes
 
MySQL Indexes
MySQL IndexesMySQL Indexes
MySQL Indexes
 
Cs437 lecture 16-18
Cs437 lecture 16-18Cs437 lecture 16-18
Cs437 lecture 16-18
 

More from GSCWU

Amazon Web Services(AWS) in cloud Computing .pptx
Amazon Web Services(AWS) in cloud Computing .pptxAmazon Web Services(AWS) in cloud Computing .pptx
Amazon Web Services(AWS) in cloud Computing .pptx
GSCWU
 
Amazon Web Services and its Global Infrastructure.pptx
Amazon Web Services and its Global  Infrastructure.pptxAmazon Web Services and its Global  Infrastructure.pptx
Amazon Web Services and its Global Infrastructure.pptx
GSCWU
 

More from GSCWU (7)

XMPP and SIP Presence Protocols for Messaging and Session Control.pptx
XMPP and SIP Presence Protocols for Messaging and Session Control.pptxXMPP and SIP Presence Protocols for Messaging and Session Control.pptx
XMPP and SIP Presence Protocols for Messaging and Session Control.pptx
 
ORACLE NET ARCHITECTURE and Its Components.pptx
ORACLE NET ARCHITECTURE and Its Components.pptxORACLE NET ARCHITECTURE and Its Components.pptx
ORACLE NET ARCHITECTURE and Its Components.pptx
 
Amazon Web Services(AWS) in cloud Computing .pptx
Amazon Web Services(AWS) in cloud Computing .pptxAmazon Web Services(AWS) in cloud Computing .pptx
Amazon Web Services(AWS) in cloud Computing .pptx
 
Amazon Web Services and its Global Infrastructure.pptx
Amazon Web Services and its Global  Infrastructure.pptxAmazon Web Services and its Global  Infrastructure.pptx
Amazon Web Services and its Global Infrastructure.pptx
 
Image Enhancement and Histogram Equalization in Digital Image Processing.ppt
Image Enhancement and Histogram Equalization in Digital Image Processing.pptImage Enhancement and Histogram Equalization in Digital Image Processing.ppt
Image Enhancement and Histogram Equalization in Digital Image Processing.ppt
 
Human Visual System in Digital Image Processing.ppt
Human Visual System in Digital Image Processing.pptHuman Visual System in Digital Image Processing.ppt
Human Visual System in Digital Image Processing.ppt
 
1.Service Models of Cloud Computing .pptx
1.Service Models of Cloud Computing .pptx1.Service Models of Cloud Computing .pptx
1.Service Models of Cloud Computing .pptx
 

Recently uploaded

一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
AS
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
ayvbos
 
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
c6eb683559b3
 
一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理
SS
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理
F
 
一比一原版英国格林多大学毕业证如何办理
一比一原版英国格林多大学毕业证如何办理一比一原版英国格林多大学毕业证如何办理
一比一原版英国格林多大学毕业证如何办理
AS
 
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
mikehavy0
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
F
 

Recently uploaded (20)

APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
一比一原版(Dundee毕业证书)英国爱丁堡龙比亚大学毕业证如何办理
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
APNIC Policy Roundup presented by Sunny Chendi at TWNOG 5.0
 
Washington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers ShirtWashington Football Commanders Redskins Feathers Shirt
Washington Football Commanders Redskins Feathers Shirt
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Loker Pemandu Lagu LC Semarang 085746015303
Loker Pemandu Lagu LC Semarang 085746015303Loker Pemandu Lagu LC Semarang 085746015303
Loker Pemandu Lagu LC Semarang 085746015303
 
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
一比一原版(NYU毕业证书)美国纽约大学毕业证学位证书
 
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirtsDown bad crying at the gym t shirts
Down bad crying at the gym t shirtsDown bad crying at the gym t shirts
 
一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理一比一原版澳大利亚迪肯大学毕业证如何办理
一比一原版澳大利亚迪肯大学毕业证如何办理
 
一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理一比一原版帝国理工学院毕业证如何办理
一比一原版帝国理工学院毕业证如何办理
 
一比一原版英国格林多大学毕业证如何办理
一比一原版英国格林多大学毕业证如何办理一比一原版英国格林多大学毕业证如何办理
一比一原版英国格林多大学毕业证如何办理
 
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
[Hackersuli] Élő szövet a fémvázon: Python és gépi tanulás a Zeek platformon
 
Nungambakkam (Chennai) Independent Escorts - 9632533318 100% genuine
Nungambakkam (Chennai) Independent Escorts - 9632533318 100% genuineNungambakkam (Chennai) Independent Escorts - 9632533318 100% genuine
Nungambakkam (Chennai) Independent Escorts - 9632533318 100% genuine
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
Abortion Clinic in Germiston +27791653574 WhatsApp Abortion Clinic Services i...
 
一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书一比一原版贝德福特大学毕业证学位证书
一比一原版贝德福特大学毕业证学位证书
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptxA LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
A LOOK INTO NETWORK TECHNOLOGIES MAINLY WAN.pptx
 

Index and types of Index used in Oracle.pptx

  • 2. Need of Index When we run query (Select marks from student where marks <33); OR When we run query (Select sale from employee where salary <5000);  Frequently verifying conditions  Frequently assessing  Assessing multiple records Index  Index maintains column data in ascending order  It also maintain addresses Why we use Index  Decrease no. of verification  Save time  Better performance
  • 3. Example Roll_No Name Marks Address Roll_No Marks 1 Ali 45 BWP 5 22 2 Usama 87 LHR 6 30 3 Usman 48 BWP 1 45 4 Ahmed 64 BWP 3 48 5 Amir 22 BWP 4 64 6 Umer 30 LHR 2 87
  • 4. Types of Index  Simple Index  Composite Index  Unique Index  Reversing Index  Function based Index  Bitmap Index Simple Index  Index create on single column. e.g., sale from employee table ,marks from student table, etc. Query  Create INDEX IDX_SALARY on employee(sale);  Searching in index, not table
  • 5. Composite Index  Index creates on multiple columns on any table. Query  Create INDEX idx_s.no_rollNo on students(s.no, rollNo); Unique Index  Index creates on columns ----- no duplication Query  Create UNIQUE INDEX idx_mobileNo on customers_dtls(mobile); Reversing Index  Want to search data frequently looking for highest value.  Normally List values------- beginning, Highest value---------ending  Its searching is fast because its work in reversing order.  Based on Binary tree.------ right to left in b.tree.  Create INDEX idx_sales_amt on sales(sales_amt) REVERSE;
  • 6. Function based index  Work on function based.  Suppose I have a table of employee, and have a column of emp_id,salary,commission Query  Select e_id,sal(0.100*sal) from emp  Create Index idx_sal on emp(sal(0.100*sal))init cap(ename); Bitmap index  Bits --------- 0,1  Less number of values in columns  E.g.,  status--active/inactive,  Gender--male/female Query  Create bitmap Index id_gender on customer(gender); Note:  All index created based on the binary tree index.