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

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
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
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
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
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
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
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 

Último (20)

Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).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
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
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
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
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
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 

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