SlideShare uma empresa Scribd logo
1 de 9
CIS282
Indexes
 Help to select and find records
 Serve as a “cross-reference”
 Can be based on one or more fields
Types of Indexes
 Clustered: How table is physically ordered
 Only one per table
 Non-Clustered: Index is maintained separately from
table (data)
 Can be stored in a separate file group to speed access
(find pointers using one drive, find records on a second
drive)
Index Organization
 Data in SQL Server is organized by ‘pages’
 When an index entry is inserted in a full page the data
is split between two pages
 By default each page is filled to allow two additions
Fill Factor
 Allows you to specify how much ‘room’ to leave open
on each page
 Specify the percentage of each page that is used initially
to store data
 Impacts how often page splits occur
 OLTP should have low percentage
 OLAP should have high percentage
“Good Index” Characteristics
 Low maintenance columns
 Values don’t change frequently
 Includes columns used frequently in Where clause
 Don’t have to go out to table for data
 Covered indexes include multiple columns where
related data is commonly used
 Help search for ranges of records
“Poor Index” Characteristics
 Columns not used in queries (where clause)
 Index doesn’t return one or few rows (selectivity)
 Exception: indexing foreign keys can speed up joins
significantly
 Many columns in index
 Few records in table
Unique Constraint v. Unique Index
 No significant differences between creating a unique
constraint and a unique index
 Data validation occurs in the same manner
 Query optimizer does not differentiate between a
unique index created by a constraint or created
manually
Unique Constraint or Unique Index?
 A unique index makes sense when uniqueness is a
characteristic of the data
 Know that will always have a different value
 If uniqueness must be enforced to ensure data
integrity, create a unique constraint
 Need to ensure that have a different value
 Unique constraint allows null
 Null treated as a value so can only occur once

Mais conteúdo relacionado

Mais procurados

Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)Ehtisham Ali
 
Database index by Reema Gajjar
Database index by Reema GajjarDatabase index by Reema Gajjar
Database index by Reema GajjarReema Gajjar
 
Indexes: The Second Pillar of Database Wisdom
Indexes: The Second Pillar of Database WisdomIndexes: The Second Pillar of Database Wisdom
Indexes: The Second Pillar of Database Wisdomgisborne
 
Relational databases
Relational databasesRelational databases
Relational databasesshams mshirb
 
MS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database ConceptsMS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database ConceptsDataminingTools Inc
 
Introduction to data structures (ss)
Introduction to data structures (ss)Introduction to data structures (ss)
Introduction to data structures (ss)Madishetty Prathibha
 
Exporting references - Library Search - Knowledge Base
Exporting references - Library Search - Knowledge BaseExporting references - Library Search - Knowledge Base
Exporting references - Library Search - Knowledge BaseUofGKnowledgebase
 
Exporting references - EBSCOhost - Knowledge Base
Exporting references - EBSCOhost - Knowledge BaseExporting references - EBSCOhost - Knowledge Base
Exporting references - EBSCOhost - Knowledge BaseUofGKnowledgebase
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on lineMilind Patil
 
Ml study notes linq
Ml study notes   linqMl study notes   linq
Ml study notes linqFeri Handoyo
 
Elasticsearch: Removal of types
Elasticsearch: Removal of typesElasticsearch: Removal of types
Elasticsearch: Removal of typesTaimur Qureshi
 

Mais procurados (20)

Sql server ___________session_17(indexes)
Sql server  ___________session_17(indexes)Sql server  ___________session_17(indexes)
Sql server ___________session_17(indexes)
 
Database index by Reema Gajjar
Database index by Reema GajjarDatabase index by Reema Gajjar
Database index by Reema Gajjar
 
Indexes: The Second Pillar of Database Wisdom
Indexes: The Second Pillar of Database WisdomIndexes: The Second Pillar of Database Wisdom
Indexes: The Second Pillar of Database Wisdom
 
Types of no sql databases
Types of no sql databasesTypes of no sql databases
Types of no sql databases
 
Sql introduction
Sql introductionSql introduction
Sql introduction
 
Index
IndexIndex
Index
 
Indexing
IndexingIndexing
Indexing
 
Mysql Indexing
Mysql IndexingMysql Indexing
Mysql Indexing
 
SQL_Part1
SQL_Part1SQL_Part1
SQL_Part1
 
Introduction to ms access database
Introduction to ms access databaseIntroduction to ms access database
Introduction to ms access database
 
Relational databases
Relational databasesRelational databases
Relational databases
 
MS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database ConceptsMS Sql Server: Introduction To Database Concepts
MS Sql Server: Introduction To Database Concepts
 
Introduction to data structures (ss)
Introduction to data structures (ss)Introduction to data structures (ss)
Introduction to data structures (ss)
 
Exporting references - Library Search - Knowledge Base
Exporting references - Library Search - Knowledge BaseExporting references - Library Search - Knowledge Base
Exporting references - Library Search - Knowledge Base
 
Exporting references - EBSCOhost - Knowledge Base
Exporting references - EBSCOhost - Knowledge BaseExporting references - EBSCOhost - Knowledge Base
Exporting references - EBSCOhost - Knowledge Base
 
Lecture12 abap on line
Lecture12 abap on lineLecture12 abap on line
Lecture12 abap on line
 
Ml study notes linq
Ml study notes   linqMl study notes   linq
Ml study notes linq
 
Mendeley ver6 wm
Mendeley ver6 wmMendeley ver6 wm
Mendeley ver6 wm
 
Xpath tutorial
Xpath tutorialXpath tutorial
Xpath tutorial
 
Elasticsearch: Removal of types
Elasticsearch: Removal of typesElasticsearch: Removal of types
Elasticsearch: Removal of types
 

Destaque

Database index(sql server)
Database index(sql server)Database index(sql server)
Database index(sql server)Aaron King
 
Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014Antonios Chatzipavlis
 
Data indexing presentation
Data indexing presentationData indexing presentation
Data indexing presentationgmbmanikandan
 
Indexing Strategies
Indexing StrategiesIndexing Strategies
Indexing Strategiesjlaspada
 
Advanced Index, Partitioning and Compression Strategies for SQL Server
Advanced Index, Partitioning and Compression Strategies for SQL ServerAdvanced Index, Partitioning and Compression Strategies for SQL Server
Advanced Index, Partitioning and Compression Strategies for SQL ServerConfio Software
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeChris Adkin
 
Collaborative filtering
Collaborative filteringCollaborative filtering
Collaborative filteringNeha Kulkarni
 
Indexing popsi....
Indexing popsi....Indexing popsi....
Indexing popsi....PAQUIAAIZEL
 
Crawling and Indexing
Crawling and IndexingCrawling and Indexing
Crawling and IndexingHimani Tyagi
 
Introduction to indexing (presentation1)
Introduction to indexing (presentation1)Introduction to indexing (presentation1)
Introduction to indexing (presentation1)Mary May Porto
 
SQL: Query optimization in practice
SQL: Query optimization in practiceSQL: Query optimization in practice
SQL: Query optimization in practiceJano Suchal
 
1. indexing and abstracting
1. indexing and abstracting1. indexing and abstracting
1. indexing and abstractingMoses Mbanje
 
Chain indexing
Chain indexingChain indexing
Chain indexingsilambu111
 

Destaque (20)

Database index(sql server)
Database index(sql server)Database index(sql server)
Database index(sql server)
 
Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014
 
Data indexing presentation
Data indexing presentationData indexing presentation
Data indexing presentation
 
Indexing
IndexingIndexing
Indexing
 
Indexing Strategies
Indexing StrategiesIndexing Strategies
Indexing Strategies
 
Advanced Index, Partitioning and Compression Strategies for SQL Server
Advanced Index, Partitioning and Compression Strategies for SQL ServerAdvanced Index, Partitioning and Compression Strategies for SQL Server
Advanced Index, Partitioning and Compression Strategies for SQL Server
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch mode
 
Indexing basics
Indexing basicsIndexing basics
Indexing basics
 
Writing optimal queries
Writing optimal queriesWriting optimal queries
Writing optimal queries
 
PostgreSQL: Advanced indexing
PostgreSQL: Advanced indexingPostgreSQL: Advanced indexing
PostgreSQL: Advanced indexing
 
Seo how search engine works
Seo how search engine worksSeo how search engine works
Seo how search engine works
 
Collaborative filtering
Collaborative filteringCollaborative filtering
Collaborative filtering
 
Indexing popsi....
Indexing popsi....Indexing popsi....
Indexing popsi....
 
Crawling and Indexing
Crawling and IndexingCrawling and Indexing
Crawling and Indexing
 
Spatial databases
Spatial databasesSpatial databases
Spatial databases
 
Introduction to indexing (presentation1)
Introduction to indexing (presentation1)Introduction to indexing (presentation1)
Introduction to indexing (presentation1)
 
SQL: Query optimization in practice
SQL: Query optimization in practiceSQL: Query optimization in practice
SQL: Query optimization in practice
 
1. indexing and abstracting
1. indexing and abstracting1. indexing and abstracting
1. indexing and abstracting
 
POPSI
POPSIPOPSI
POPSI
 
Chain indexing
Chain indexingChain indexing
Chain indexing
 

Semelhante a Indexes

dotnetMALAGA - Sql query tuning guidelines
dotnetMALAGA - Sql query tuning guidelinesdotnetMALAGA - Sql query tuning guidelines
dotnetMALAGA - Sql query tuning guidelinesJavier García Magna
 
Sql Interview Questions
Sql Interview QuestionsSql Interview Questions
Sql Interview Questionsarjundwh
 
153680 sqlinterview
153680  sqlinterview153680  sqlinterview
153680 sqlinterviewzdsgsgdf
 
Sql server lesson6
Sql server lesson6Sql server lesson6
Sql server lesson6Ala Qunaibi
 
DATA PROCESSING NOTE ON INDEXING
DATA PROCESSING NOTE ON INDEXINGDATA PROCESSING NOTE ON INDEXING
DATA PROCESSING NOTE ON INDEXINGdavid22266
 
Database and Research Matrix.pptx
Database and Research Matrix.pptxDatabase and Research Matrix.pptx
Database and Research Matrix.pptxRahulRoshan37
 
Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Aaron Shilo
 
Intro to elasticsearch
Intro to elasticsearchIntro to elasticsearch
Intro to elasticsearchJoey Wen
 
Database Performance
Database PerformanceDatabase Performance
Database PerformanceBoris Hristov
 
Top 20 SQL interview questions.pdf
Top 20 SQL interview questions.pdfTop 20 SQL interview questions.pdf
Top 20 SQL interview questions.pdfAnanthReddy38
 
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکیDeep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکیEhsan Asgarian
 
Query Optimization in SQL Server
Query Optimization in SQL ServerQuery Optimization in SQL Server
Query Optimization in SQL ServerRajesh Gunasundaram
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&aSyed Shah
 

Semelhante a Indexes (20)

dotnetMALAGA - Sql query tuning guidelines
dotnetMALAGA - Sql query tuning guidelinesdotnetMALAGA - Sql query tuning guidelines
dotnetMALAGA - Sql query tuning guidelines
 
Module08
Module08Module08
Module08
 
Module08
Module08Module08
Module08
 
Sql
SqlSql
Sql
 
Sql Interview Questions
Sql Interview QuestionsSql Interview Questions
Sql Interview Questions
 
Sql
SqlSql
Sql
 
Sql
SqlSql
Sql
 
153680 sqlinterview
153680  sqlinterview153680  sqlinterview
153680 sqlinterview
 
Sql server lesson6
Sql server lesson6Sql server lesson6
Sql server lesson6
 
DATA PROCESSING NOTE ON INDEXING
DATA PROCESSING NOTE ON INDEXINGDATA PROCESSING NOTE ON INDEXING
DATA PROCESSING NOTE ON INDEXING
 
Database and Research Matrix.pptx
Database and Research Matrix.pptxDatabase and Research Matrix.pptx
Database and Research Matrix.pptx
 
Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…Getting to know oracle database objects iot, mviews, clusters and more…
Getting to know oracle database objects iot, mviews, clusters and more…
 
Index in sql server
Index in sql serverIndex in sql server
Index in sql server
 
Intro to elasticsearch
Intro to elasticsearchIntro to elasticsearch
Intro to elasticsearch
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 
Database Performance
Database PerformanceDatabase Performance
Database Performance
 
Top 20 SQL interview questions.pdf
Top 20 SQL interview questions.pdfTop 20 SQL interview questions.pdf
Top 20 SQL interview questions.pdf
 
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکیDeep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
Deep dive to ElasticSearch - معرفی ابزار جستجوی الاستیکی
 
Query Optimization in SQL Server
Query Optimization in SQL ServerQuery Optimization in SQL Server
Query Optimization in SQL Server
 
Sql interview q&a
Sql interview q&aSql interview q&a
Sql interview q&a
 

Mais de Randy Riness @ South Puget Sound Community College

Mais de Randy Riness @ South Puget Sound Community College (20)

Stored procedures
Stored proceduresStored procedures
Stored procedures
 
3 sql overview
3 sql overview3 sql overview
3 sql overview
 
Normalization
NormalizationNormalization
Normalization
 
CIS160 final review
CIS160 final reviewCIS160 final review
CIS160 final review
 
SQL Constraints
SQL ConstraintsSQL Constraints
SQL Constraints
 
CIS 245 Final Review
CIS 245 Final ReviewCIS 245 Final Review
CIS 245 Final Review
 
CIS145 Final Review
CIS145 Final ReviewCIS145 Final Review
CIS145 Final Review
 
Cis166 Final Review C#
Cis166 Final Review C#Cis166 Final Review C#
Cis166 Final Review C#
 
Classes and Objects
Classes and ObjectsClasses and Objects
Classes and Objects
 
CIS245 sql
CIS245 sqlCIS245 sql
CIS245 sql
 
Cis245 Midterm Review
Cis245 Midterm ReviewCis245 Midterm Review
Cis245 Midterm Review
 
CSS
CSSCSS
CSS
 
XPath
XPathXPath
XPath
 
XSLT Overview
XSLT OverviewXSLT Overview
XSLT Overview
 
Views
ViewsViews
Views
 
CIS282 Midterm review
CIS282 Midterm reviewCIS282 Midterm review
CIS282 Midterm review
 
Schemas 2 - Restricting Values
Schemas 2 - Restricting ValuesSchemas 2 - Restricting Values
Schemas 2 - Restricting Values
 
CIS 145 test 1 review
CIS 145 test 1 reviewCIS 145 test 1 review
CIS 145 test 1 review
 
XML schemas
XML schemasXML schemas
XML schemas
 
Document type definitions part 2
Document type definitions part 2Document type definitions part 2
Document type definitions part 2
 

Último

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 

Último (20)

Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 

Indexes

  • 2. Indexes  Help to select and find records  Serve as a “cross-reference”  Can be based on one or more fields
  • 3. Types of Indexes  Clustered: How table is physically ordered  Only one per table  Non-Clustered: Index is maintained separately from table (data)  Can be stored in a separate file group to speed access (find pointers using one drive, find records on a second drive)
  • 4. Index Organization  Data in SQL Server is organized by ‘pages’  When an index entry is inserted in a full page the data is split between two pages  By default each page is filled to allow two additions
  • 5. Fill Factor  Allows you to specify how much ‘room’ to leave open on each page  Specify the percentage of each page that is used initially to store data  Impacts how often page splits occur  OLTP should have low percentage  OLAP should have high percentage
  • 6. “Good Index” Characteristics  Low maintenance columns  Values don’t change frequently  Includes columns used frequently in Where clause  Don’t have to go out to table for data  Covered indexes include multiple columns where related data is commonly used  Help search for ranges of records
  • 7. “Poor Index” Characteristics  Columns not used in queries (where clause)  Index doesn’t return one or few rows (selectivity)  Exception: indexing foreign keys can speed up joins significantly  Many columns in index  Few records in table
  • 8. Unique Constraint v. Unique Index  No significant differences between creating a unique constraint and a unique index  Data validation occurs in the same manner  Query optimizer does not differentiate between a unique index created by a constraint or created manually
  • 9. Unique Constraint or Unique Index?  A unique index makes sense when uniqueness is a characteristic of the data  Know that will always have a different value  If uniqueness must be enforced to ensure data integrity, create a unique constraint  Need to ensure that have a different value  Unique constraint allows null  Null treated as a value so can only occur once