SlideShare a Scribd company logo
1 of 6
Download to read offline
* Property of STI
Page 1 of 6
Indexes
F0004
What is an Index?
 An index is a data structure used in
database systems to perform faster
lookup.
 Indexes can greatly improve the
performance of searches on the
indexed column or columns.
 Example:
SELECT companyname
FROM supplier
WHERE supplierid = 'NBS'
* Property of STI
Page 2 of 6
Indexes
F0004
When to Create an Index?
 Factors that can be considered to
determine if you should create an
index are as follows:
• Keys and unique columns
• Frequency of search
• Size of table
• Number of updates
• Space considerations
• Data distribution
* Property of STI
Page 3 of 6
Indexes
F0004
CREATE INDEX
 The syntax is shown below:
CREATE [UNIQUE] INDEX
<indexname> ON <table
name>(<column list>)
 This syntax creates an index on the
values of the attribute in <column
list> from table <table name>.
 Example:
CREATE UNIQUE INDEX
supplierindex ON
suppliers(supplierid);
* Property of STI
Page 4 of 6
Indexes
F0004
DROP INDEX
 The syntax is shown below:
DROP INDEX <index name>
 This syntax removes an index
specified by the <index name>.
 Example:
DROP INDEX supplierindex;
* Property of STI
Page 5 of 6
Indexes
F0004
Composite Index
 A composite index is an index that
can contain one, two, or more
columns. The syntax is shown
below:
CREATE [UNIQUE] INDEX
<indexname> ON <table
name>(<column1>,
<column1>, …<columnN>)
 Example:
CREATE INDEX name
ON student (stud_lname,
stud_fname)
* Property of STI
Page 6 of 6
Indexes
F0004
Composite Index
 In creating composite index, the
order of columns should be the
same as the order of the columns
in the table.
 Composite indexes are useful for
searching on all columns in the
index or on the first columns only.
 Example:
CREATE INDEX fname_lname
ON student stud_fname,
stud_lname;
CREATE INDEX lname_fname
ON student stud_lname,
stud_fname;

More Related Content

What's hot

MS Access Create Tab & Form Group
MS Access Create Tab & Form GroupMS Access Create Tab & Form Group
MS Access Create Tab & Form GroupZeeshan Alam
 
Advanced Filter in Excel
Advanced Filter in ExcelAdvanced Filter in Excel
Advanced Filter in Exceldinesh takyar
 
01 access howtointroduction
01 access howtointroduction01 access howtointroduction
01 access howtointroductionRebecca Jones
 
Access 2013 Unit A
Access 2013 Unit AAccess 2013 Unit A
Access 2013 Unit Ajarana00
 

What's hot (6)

MS Access Create Tab & Form Group
MS Access Create Tab & Form GroupMS Access Create Tab & Form Group
MS Access Create Tab & Form Group
 
V25 sql index
V25 sql indexV25 sql index
V25 sql index
 
Advanced Filter in Excel
Advanced Filter in ExcelAdvanced Filter in Excel
Advanced Filter in Excel
 
01 access howtointroduction
01 access howtointroduction01 access howtointroduction
01 access howtointroduction
 
Access 2007 Unit B
Access 2007 Unit BAccess 2007 Unit B
Access 2007 Unit B
 
Access 2013 Unit A
Access 2013 Unit AAccess 2013 Unit A
Access 2013 Unit A
 

Viewers also liked

Indexes - INSTRUCTOR'S GUIDE
Indexes - INSTRUCTOR'S GUIDEIndexes - INSTRUCTOR'S GUIDE
Indexes - INSTRUCTOR'S GUIDEAnne Lee
 
Wk 15 ses 40 42 makrong kasanayan sa pagbabasa
Wk 15 ses 40 42 makrong kasanayan sa pagbabasaWk 15 ses 40 42 makrong kasanayan sa pagbabasa
Wk 15 ses 40 42 makrong kasanayan sa pagbabasaAnne Lee
 
Data mining
Data miningData mining
Data miningAnne Lee
 
03 laboratory exercise 1 - WORKING WITH CTE
03 laboratory exercise 1 - WORKING WITH CTE03 laboratory exercise 1 - WORKING WITH CTE
03 laboratory exercise 1 - WORKING WITH CTEAnne Lee
 
Wk 12 ses 32 34 makrong kasanayan sa pakikinig
Wk 12 ses 32 34 makrong kasanayan sa pakikinigWk 12 ses 32 34 makrong kasanayan sa pakikinig
Wk 12 ses 32 34 makrong kasanayan sa pakikinigAnne Lee
 
Data warehousing
Data warehousingData warehousing
Data warehousingAnne Lee
 
Database monitoring and performance management
Database monitoring and performance managementDatabase monitoring and performance management
Database monitoring and performance managementAnne Lee
 
06 laboratory exercise 1
06 laboratory exercise 106 laboratory exercise 1
06 laboratory exercise 1Anne Lee
 
Wk 13 ses 35 37 makrong kasanayan sa pagsasalita
Wk 13 ses 35 37 makrong kasanayan sa pagsasalitaWk 13 ses 35 37 makrong kasanayan sa pagsasalita
Wk 13 ses 35 37 makrong kasanayan sa pagsasalitaAnne Lee
 
08 ohp slides 1
08 ohp slides 108 ohp slides 1
08 ohp slides 1Anne Lee
 
Using olap
Using olapUsing olap
Using olapAnne Lee
 
06 lcd slides 1 - PROCESS SYNCHRONIZATION POWERPOINT
06 lcd slides 1 - PROCESS SYNCHRONIZATION POWERPOINT06 lcd slides 1 - PROCESS SYNCHRONIZATION POWERPOINT
06 lcd slides 1 - PROCESS SYNCHRONIZATION POWERPOINTAnne Lee
 
Week 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseWeek 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseAnne Lee
 
05 lcd slides 1 - CPU SCHEDULING (Powerpoint)
05 lcd slides 1 - CPU SCHEDULING (Powerpoint)05 lcd slides 1 - CPU SCHEDULING (Powerpoint)
05 lcd slides 1 - CPU SCHEDULING (Powerpoint)Anne Lee
 
Advanced php
Advanced phpAdvanced php
Advanced phpAnne Lee
 
Review of theory of database
Review of theory of databaseReview of theory of database
Review of theory of databaseAnne Lee
 
transportation and assignment models
transportation and assignment modelstransportation and assignment models
transportation and assignment modelsAnne Lee
 

Viewers also liked (18)

Indexes - INSTRUCTOR'S GUIDE
Indexes - INSTRUCTOR'S GUIDEIndexes - INSTRUCTOR'S GUIDE
Indexes - INSTRUCTOR'S GUIDE
 
Wk 15 ses 40 42 makrong kasanayan sa pagbabasa
Wk 15 ses 40 42 makrong kasanayan sa pagbabasaWk 15 ses 40 42 makrong kasanayan sa pagbabasa
Wk 15 ses 40 42 makrong kasanayan sa pagbabasa
 
Data mining
Data miningData mining
Data mining
 
03 laboratory exercise 1 - WORKING WITH CTE
03 laboratory exercise 1 - WORKING WITH CTE03 laboratory exercise 1 - WORKING WITH CTE
03 laboratory exercise 1 - WORKING WITH CTE
 
Wk 12 ses 32 34 makrong kasanayan sa pakikinig
Wk 12 ses 32 34 makrong kasanayan sa pakikinigWk 12 ses 32 34 makrong kasanayan sa pakikinig
Wk 12 ses 32 34 makrong kasanayan sa pakikinig
 
Data warehousing
Data warehousingData warehousing
Data warehousing
 
Database monitoring and performance management
Database monitoring and performance managementDatabase monitoring and performance management
Database monitoring and performance management
 
06 laboratory exercise 1
06 laboratory exercise 106 laboratory exercise 1
06 laboratory exercise 1
 
04 quiz 1
04 quiz 104 quiz 1
04 quiz 1
 
Wk 13 ses 35 37 makrong kasanayan sa pagsasalita
Wk 13 ses 35 37 makrong kasanayan sa pagsasalitaWk 13 ses 35 37 makrong kasanayan sa pagsasalita
Wk 13 ses 35 37 makrong kasanayan sa pagsasalita
 
08 ohp slides 1
08 ohp slides 108 ohp slides 1
08 ohp slides 1
 
Using olap
Using olapUsing olap
Using olap
 
06 lcd slides 1 - PROCESS SYNCHRONIZATION POWERPOINT
06 lcd slides 1 - PROCESS SYNCHRONIZATION POWERPOINT06 lcd slides 1 - PROCESS SYNCHRONIZATION POWERPOINT
06 lcd slides 1 - PROCESS SYNCHRONIZATION POWERPOINT
 
Week 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed databaseWeek 17 slides 1 7 multidimensional, parallel, and distributed database
Week 17 slides 1 7 multidimensional, parallel, and distributed database
 
05 lcd slides 1 - CPU SCHEDULING (Powerpoint)
05 lcd slides 1 - CPU SCHEDULING (Powerpoint)05 lcd slides 1 - CPU SCHEDULING (Powerpoint)
05 lcd slides 1 - CPU SCHEDULING (Powerpoint)
 
Advanced php
Advanced phpAdvanced php
Advanced php
 
Review of theory of database
Review of theory of databaseReview of theory of database
Review of theory of database
 
transportation and assignment models
transportation and assignment modelstransportation and assignment models
transportation and assignment models
 

Similar to 07 ohp slides 1 - INDEXES

Optimizing MySQL Queries
Optimizing MySQL QueriesOptimizing MySQL Queries
Optimizing MySQL QueriesAchievers Tech
 
Index the obvious and not so obvious
Index the obvious and not so obviousIndex the obvious and not so obvious
Index the obvious and not so obviousHarry Zheng
 
Solr中国6月21日企业搜索
Solr中国6月21日企业搜索Solr中国6月21日企业搜索
Solr中国6月21日企业搜索longkeyy
 
Covering indexes
Covering indexesCovering indexes
Covering indexesMYXPLAIN
 
Database Performance
Database PerformanceDatabase Performance
Database PerformanceBoris Hristov
 
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1 "Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1 Andriy Krayniy
 
Database Akjljljlkjlkjkljlkjldiministration.pptx
Database Akjljljlkjlkjkljlkjldiministration.pptxDatabase Akjljljlkjlkjkljlkjldiministration.pptx
Database Akjljljlkjlkjkljlkjldiministration.pptxEliasPetros
 
SQL Server 2000 Research Series - Performance Tuning
SQL Server 2000 Research Series - Performance TuningSQL Server 2000 Research Series - Performance Tuning
SQL Server 2000 Research Series - Performance TuningJerry Yang
 
Access essential training framework
Access essential training   frameworkAccess essential training   framework
Access essential training frameworkVijay Perepa
 
How to analyze and tune sql queries for better performance percona15
How to analyze and tune sql queries for better performance percona15How to analyze and tune sql queries for better performance percona15
How to analyze and tune sql queries for better performance percona15oysteing
 
Sql server introduction
Sql server introductionSql server introduction
Sql server introductionRiteshkiit
 

Similar to 07 ohp slides 1 - INDEXES (20)

Optimizing MySQL Queries
Optimizing MySQL QueriesOptimizing MySQL Queries
Optimizing MySQL Queries
 
Oracle Index
Oracle IndexOracle Index
Oracle Index
 
Index the obvious and not so obvious
Index the obvious and not so obviousIndex the obvious and not so obvious
Index the obvious and not so obvious
 
Module08
Module08Module08
Module08
 
Module08
Module08Module08
Module08
 
Solr中国6月21日企业搜索
Solr中国6月21日企业搜索Solr中国6月21日企业搜索
Solr中国6月21日企业搜索
 
Covering indexes
Covering indexesCovering indexes
Covering indexes
 
MySQL INDEXES
MySQL INDEXESMySQL INDEXES
MySQL INDEXES
 
Database Performance
Database PerformanceDatabase Performance
Database Performance
 
Rdbms day3
Rdbms day3Rdbms day3
Rdbms day3
 
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1 "Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1
"Using Indexes in SQL Server 2008" by Alexander Korotkiy, part 1
 
Database Akjljljlkjlkjkljlkjldiministration.pptx
Database Akjljljlkjlkjkljlkjldiministration.pptxDatabase Akjljljlkjlkjkljlkjldiministration.pptx
Database Akjljljlkjlkjkljlkjldiministration.pptx
 
SQL Server 2000 Research Series - Performance Tuning
SQL Server 2000 Research Series - Performance TuningSQL Server 2000 Research Series - Performance Tuning
SQL Server 2000 Research Series - Performance Tuning
 
Indexing
IndexingIndexing
Indexing
 
Access essential training framework
Access essential training   frameworkAccess essential training   framework
Access essential training framework
 
How to analyze and tune sql queries for better performance percona15
How to analyze and tune sql queries for better performance percona15How to analyze and tune sql queries for better performance percona15
How to analyze and tune sql queries for better performance percona15
 
Module 3
Module 3Module 3
Module 3
 
Sql server introduction
Sql server introductionSql server introduction
Sql server introduction
 
Physical Design and Development
Physical Design and DevelopmentPhysical Design and Development
Physical Design and Development
 
Ms sql server tips 1 0
Ms sql server tips 1 0Ms sql server tips 1 0
Ms sql server tips 1 0
 

More from Anne Lee

Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recoveryAnne Lee
 
Database Security Slide Handout
Database Security Slide HandoutDatabase Security Slide Handout
Database Security Slide HandoutAnne Lee
 
Database Security Handout
Database Security HandoutDatabase Security Handout
Database Security HandoutAnne Lee
 
Database Security - IG
Database Security - IGDatabase Security - IG
Database Security - IGAnne Lee
 
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLESAnne Lee
 
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATIONAnne Lee
 
07 ohp slide handout 1 - INDEXES
07 ohp slide handout 1 - INDEXES07 ohp slide handout 1 - INDEXES
07 ohp slide handout 1 - INDEXESAnne Lee
 
Wk 16 ses 43 45 makrong kasanayan sa pagsusulat
Wk 16 ses 43 45 makrong kasanayan sa pagsusulatWk 16 ses 43 45 makrong kasanayan sa pagsusulat
Wk 16 ses 43 45 makrong kasanayan sa pagsusulatAnne Lee
 
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1Anne Lee
 
07 lcd slides 1 - DEADLOCKS POWERPOINT
07 lcd slides 1 - DEADLOCKS POWERPOINT07 lcd slides 1 - DEADLOCKS POWERPOINT
07 lcd slides 1 - DEADLOCKS POWERPOINTAnne Lee
 
05 lcd slide handout 1 - CPU SCHEDULING
05 lcd slide handout 1 - CPU SCHEDULING05 lcd slide handout 1 - CPU SCHEDULING
05 lcd slide handout 1 - CPU SCHEDULINGAnne Lee
 
04 quiz 1 answer key
04 quiz 1 answer key04 quiz 1 answer key
04 quiz 1 answer keyAnne Lee
 
04 laboratory exercise 1
04 laboratory exercise 104 laboratory exercise 1
04 laboratory exercise 1Anne Lee
 
03 ohp slides 1
03 ohp slides 103 ohp slides 1
03 ohp slides 1Anne Lee
 
03 ohp slide handout 1
03 ohp slide handout 103 ohp slide handout 1
03 ohp slide handout 1Anne Lee
 
03 laboratory exercise 1
03 laboratory exercise 103 laboratory exercise 1
03 laboratory exercise 1Anne Lee
 

More from Anne Lee (16)

Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
Database Security Slide Handout
Database Security Slide HandoutDatabase Security Slide Handout
Database Security Slide Handout
 
Database Security Handout
Database Security HandoutDatabase Security Handout
Database Security Handout
 
Database Security - IG
Database Security - IGDatabase Security - IG
Database Security - IG
 
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
02 laboratory exercise 1 - RETRIEVING DATA FROM SEVERAL TABLES
 
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
01 laboratory exercise 1 - DESIGN A SIMPLE DATABASE APPLICATION
 
07 ohp slide handout 1 - INDEXES
07 ohp slide handout 1 - INDEXES07 ohp slide handout 1 - INDEXES
07 ohp slide handout 1 - INDEXES
 
Wk 16 ses 43 45 makrong kasanayan sa pagsusulat
Wk 16 ses 43 45 makrong kasanayan sa pagsusulatWk 16 ses 43 45 makrong kasanayan sa pagsusulat
Wk 16 ses 43 45 makrong kasanayan sa pagsusulat
 
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
Wk 11 ses 29 31 konseptong pangkomunikasyon - FILIPINO 1
 
07 lcd slides 1 - DEADLOCKS POWERPOINT
07 lcd slides 1 - DEADLOCKS POWERPOINT07 lcd slides 1 - DEADLOCKS POWERPOINT
07 lcd slides 1 - DEADLOCKS POWERPOINT
 
05 lcd slide handout 1 - CPU SCHEDULING
05 lcd slide handout 1 - CPU SCHEDULING05 lcd slide handout 1 - CPU SCHEDULING
05 lcd slide handout 1 - CPU SCHEDULING
 
04 quiz 1 answer key
04 quiz 1 answer key04 quiz 1 answer key
04 quiz 1 answer key
 
04 laboratory exercise 1
04 laboratory exercise 104 laboratory exercise 1
04 laboratory exercise 1
 
03 ohp slides 1
03 ohp slides 103 ohp slides 1
03 ohp slides 1
 
03 ohp slide handout 1
03 ohp slide handout 103 ohp slide handout 1
03 ohp slide handout 1
 
03 laboratory exercise 1
03 laboratory exercise 103 laboratory exercise 1
03 laboratory exercise 1
 

Recently uploaded

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 

Recently uploaded (20)

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 

07 ohp slides 1 - INDEXES

  • 1. * Property of STI Page 1 of 6 Indexes F0004 What is an Index?  An index is a data structure used in database systems to perform faster lookup.  Indexes can greatly improve the performance of searches on the indexed column or columns.  Example: SELECT companyname FROM supplier WHERE supplierid = 'NBS'
  • 2. * Property of STI Page 2 of 6 Indexes F0004 When to Create an Index?  Factors that can be considered to determine if you should create an index are as follows: • Keys and unique columns • Frequency of search • Size of table • Number of updates • Space considerations • Data distribution
  • 3. * Property of STI Page 3 of 6 Indexes F0004 CREATE INDEX  The syntax is shown below: CREATE [UNIQUE] INDEX <indexname> ON <table name>(<column list>)  This syntax creates an index on the values of the attribute in <column list> from table <table name>.  Example: CREATE UNIQUE INDEX supplierindex ON suppliers(supplierid);
  • 4. * Property of STI Page 4 of 6 Indexes F0004 DROP INDEX  The syntax is shown below: DROP INDEX <index name>  This syntax removes an index specified by the <index name>.  Example: DROP INDEX supplierindex;
  • 5. * Property of STI Page 5 of 6 Indexes F0004 Composite Index  A composite index is an index that can contain one, two, or more columns. The syntax is shown below: CREATE [UNIQUE] INDEX <indexname> ON <table name>(<column1>, <column1>, …<columnN>)  Example: CREATE INDEX name ON student (stud_lname, stud_fname)
  • 6. * Property of STI Page 6 of 6 Indexes F0004 Composite Index  In creating composite index, the order of columns should be the same as the order of the columns in the table.  Composite indexes are useful for searching on all columns in the index or on the first columns only.  Example: CREATE INDEX fname_lname ON student stud_fname, stud_lname; CREATE INDEX lname_fname ON student stud_lname, stud_fname;