SlideShare une entreprise Scribd logo
1  sur  16
Database Administration:
The Complete Guide to Practices and Procedures
Chapter 11
Database Performance
Partitioning
• A database table is a logical manifestation of a
set of data that physically resides on storage.
• Each DBMS provides different mechanisms for
physical files to database tables.
• The DBA must decide from among the
following mapping options for each table:
– Single table to a single file
– Single table to multiple files
– Multiple tables to a single file
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
Raw Partition vs. File System
Raw Partition Versus File System
DASD
SQL
Server
C
A
C
H
E
UNIX
C
A
C
H
E
DBMS
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
Impact of Adding an Index
• The DBA should have an understanding of the
access patterns of the table on which the index
will be built.
• Useful information includes:
– the percentage of queries that access rather than
update the table
– the performance thresholds set within any service
level agreements for queries on the table
– the impact of adding a new index to running database
utilities such as loads, reorganizations, and recovery
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
When to Avoid Indexing
• When all accesses retrieve every row of the table.
– Because every row will be retrieved every time you want to use the table an
index (if used) would just add extra I/O and would decrease, not enhance
performance. Though not extremely common, you may indeed come across
such tables in your organization.
• For a very small table with only a few pages of data and no primary key or
uniqueness requirements.
– A very small table (perhaps 10 or 20 pages) might not need an index because
simply reading all of the pages is very efficient already.
• When performance doesn't matter and the table is only accessed very
infrequently.
– But when do you ever have those requirements in the real world?
• You may want to avoid indexing variable-length columns. Expansion can
cause indexes to consume an inordinate amount of disk space.
– However, if variable-length columns are used in SQL WHERE clauses, the cost
of disk storage must be compared to the cost of scanning. Buying some extra
disk storage is usually cheaper than wasting CPU resources to scan rows.
• Low cardinality columns.
– For example: GENDER
http://db2portal.blogspot.com/2008/09/when-not-to-index.html
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
Clustering
• A clustered table will store its rows physically on disk in order by a
specified column or columns.
Clustered vs. Nonclustered
Root Index Page
2 30 55
Index Leaf Page
30
Index Leaf Page
2
5
6
7
10
11
13
15
19
22
Data Page Data Page Data Page
2 7 15
Root Index Page
2 14 27
2 5 7 11
Index Leaf Page
14
Index Leaf Page
5
11
23
20
21
2
26
35
7
14
Data Page Data Page Data Page
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
General Advice on Clustering
• As a rule of thumb: if the DBMS supports clustering, it is
usually a good practice to define clustering for each table
that is created.
– Unless the table is very small.
• You can only have one clustering sequence.
– When a table has multiple candidates for clustering, weigh the
cost of sorting against the performance gained by clustering for
each candidate key.
• Clustering is generally not recommended for primary key
columns because the primary key is, by definition, unique.
– However, if ranges of rows frequently are selected and ordered
by primary key value, a clustering index may be beneficial.This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
Interleaving Data
• Also covered earlier (lesson 4).
• When data is interleaved, rows from two
tables are combined physically in a single
physical sequence by a join key.
• Interleaving can be used to improve the
performance of joins.
• Interleaving can be viewed as a specialized
form of clustering.
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
Determining Correct Free Space
The correct amount of free space must be based
on the following criteria:
• Frequency of inserts and modifications
• Amount of sequential versus random access
• Impact of accessing unclustered data
• Type of processing
• Likelihood of row chaining, row migration, and
page splits
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
File Placement and Allocation
• Data placement optimizes access by reducing
contention on physical devices.
• Must understand the access patterns associated
with each piece of data in the system
• Specifically allocate the data on physical disk
devices in such a way as to optimize performance
• However, with modern disk systems such as RAID
devices, precise file placement is often difficult, if
not impossible to achieve.
– More details on RAID is forthcoming in lesson 18.
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
Disk Allocation
• The DBMS may require disk devices to be
allocated for database usage.
• Specific commands are provided by each DBMS
to initialize physical disk devices.
– The disk initialization command will associate a logical
name for a physical disk partition or OS file.
– After the disk has been initialized, it is stored in the
system catalog and can be used for storing table data.
• Use meaningful device names to facilitate more
efficient usage and management of disk devices.
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
Database Reorganization
Causes of database disorganization:
• Unclustered data. A clustered table or index can become unclustered as data is added and
changed. If the data becomes significantly unclustered, queries that were optimized to access
data cannot take advantage of the clustering sequence causing performance to suffer.
• Fragmentation is a condition in which there are many scattered areas of storage in a
database that are too small to be used productively. It results in wasted space, which can
hinder performance because additional I/Os are required to retrieve the same data.
• Row chaining or row migration occurs when updated data does not fit in the space it
currently occupies, and the DBMS must find space for the row. In each case, a pointer is used
to locate either the rest of the row or the full row., causing performance to suffer.
– With row chaining, the DBMS moves a part of the new, larger row to a location within
the tablespace where free space exists.
– With row migrations, the full row is placed elsewhere in the tablespace.
– IPage splits can cause disorganized databases, too. If the DBMS performs monotonic
page splits when it should perform normal page splits, or vice versa, space may be
wasted. When space is wasted, fewer rows exist on each page, causing the DBMS to
issue more I/O requests to retrieve data. Therefore, once again, performance suffers.
• File extents can negatively impact performance. An extent is an additional file that is tied to
the original file and can be used only in conjunction with the original file. When the file used
by a tablespace runs out of space, an extent is added for the file to expand.
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
Reorganize Indexes and Tablespaces
• Tablespaces and indexes both can be reorganized.
• How the DBA runs a REORG utility depends on
the DBMS.
– Some DBMS products ship with a built-in
reorganization utility.
– Others require the customer to purchase the utility.
– Still others claim that the customer will not need the
utility at all when using their DBMS.
• In practice, this last claim is not true. Every DBMS incurs
some degree of disorganization as data is added and
modified… and can therefore benefit from reorganization.
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
Determining When to Reorganize
• System catalog statistics can help to determine
when to reorganize a database object.
• Each DBMS provides a method of reading
through the contents of the database and
recording statistical information about each
database object.
• Depending on the DBMS, this statistical
information is stored either in the system catalog
or in special pages within the database object
itself.
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
Using Statistics to Schedule
Index Reorganization
• Index levels
• Leaf distance
– Distance between leaf pages
This document is a partial preview. Full document download can be found on Flevy:
http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
1
Flevy (www.flevy.com) is the marketplace
for premium documents. These
documents can range from Business
Frameworks to Financial Models to
PowerPoint Templates.
Flevy was founded under the principle that
companies waste a lot of time and money
recreating the same foundational business
documents. Our vision is for Flevy to
become a comprehensive knowledge base
of business documents. All organizations,
from startups to large enterprises, can use
Flevy— whether it's to jumpstart projects, to
find reference or comparison materials, or
just to learn.
Contact Us
Please contact us with any questions you may have
about our company.
• General Inquiries
support@flevy.com
• Media/PR
press@flevy.com
• Billing
billing@flevy.com

Contenu connexe

Plus de Flevy.com Best Practices

[Whitepaper] 8 Key Steps of Data Integration: Restructuring Redeployment Asse...
[Whitepaper] 8 Key Steps of Data Integration: Restructuring Redeployment Asse...[Whitepaper] 8 Key Steps of Data Integration: Restructuring Redeployment Asse...
[Whitepaper] 8 Key Steps of Data Integration: Restructuring Redeployment Asse...Flevy.com Best Practices
 
[Whitepaper] Strategy Classics: Value Disciplines Model
[Whitepaper] Strategy Classics: Value Disciplines Model[Whitepaper] Strategy Classics: Value Disciplines Model
[Whitepaper] Strategy Classics: Value Disciplines ModelFlevy.com Best Practices
 
[Whitepaper] The Definitive Guide to Strategic Planning: Here’s What You Need...
[Whitepaper] The Definitive Guide to Strategic Planning: Here’s What You Need...[Whitepaper] The Definitive Guide to Strategic Planning: Here’s What You Need...
[Whitepaper] The Definitive Guide to Strategic Planning: Here’s What You Need...Flevy.com Best Practices
 
[Whitepaper] The Definitive Introduction to Strategy Development and Strategy...
[Whitepaper] The Definitive Introduction to Strategy Development and Strategy...[Whitepaper] The Definitive Introduction to Strategy Development and Strategy...
[Whitepaper] The Definitive Introduction to Strategy Development and Strategy...Flevy.com Best Practices
 
[Whitepaper] The “Theory of Constraints:” What’s Limiting Your Organization?
[Whitepaper] The “Theory of Constraints:” What’s Limiting Your Organization?[Whitepaper] The “Theory of Constraints:” What’s Limiting Your Organization?
[Whitepaper] The “Theory of Constraints:” What’s Limiting Your Organization?Flevy.com Best Practices
 
[Whitepaper] Transportation Cost Reduction in Supply Chain Management
[Whitepaper] Transportation Cost Reduction in Supply Chain Management[Whitepaper] Transportation Cost Reduction in Supply Chain Management
[Whitepaper] Transportation Cost Reduction in Supply Chain ManagementFlevy.com Best Practices
 
[Whitepaper] A Great Leadership Experience: Dr. Rachid Yazami, Inventor of th...
[Whitepaper] A Great Leadership Experience: Dr. Rachid Yazami, Inventor of th...[Whitepaper] A Great Leadership Experience: Dr. Rachid Yazami, Inventor of th...
[Whitepaper] A Great Leadership Experience: Dr. Rachid Yazami, Inventor of th...Flevy.com Best Practices
 
[Whitepaper] Finding It Hard to Manage Conflict at the Workplace? Use the Tho...
[Whitepaper] Finding It Hard to Manage Conflict at the Workplace? Use the Tho...[Whitepaper] Finding It Hard to Manage Conflict at the Workplace? Use the Tho...
[Whitepaper] Finding It Hard to Manage Conflict at the Workplace? Use the Tho...Flevy.com Best Practices
 
[Whitepaper] Key Account Management: Handling Large Global Accounts the Right...
[Whitepaper] Key Account Management: Handling Large Global Accounts the Right...[Whitepaper] Key Account Management: Handling Large Global Accounts the Right...
[Whitepaper] Key Account Management: Handling Large Global Accounts the Right...Flevy.com Best Practices
 
[Whitepaper] Nudge Theory: An Effective Way to Transform Negative Behaviors
[Whitepaper] Nudge Theory: An Effective Way to Transform Negative Behaviors[Whitepaper] Nudge Theory: An Effective Way to Transform Negative Behaviors
[Whitepaper] Nudge Theory: An Effective Way to Transform Negative BehaviorsFlevy.com Best Practices
 
[Whitepaper] Business Model Innovation: Creation of Scalable Business Models ...
[Whitepaper] Business Model Innovation: Creation of Scalable Business Models ...[Whitepaper] Business Model Innovation: Creation of Scalable Business Models ...
[Whitepaper] Business Model Innovation: Creation of Scalable Business Models ...Flevy.com Best Practices
 
[Whitepaper] Shareholder Value Traps: How to Evade Them and Focus on Value Cr...
[Whitepaper] Shareholder Value Traps: How to Evade Them and Focus on Value Cr...[Whitepaper] Shareholder Value Traps: How to Evade Them and Focus on Value Cr...
[Whitepaper] Shareholder Value Traps: How to Evade Them and Focus on Value Cr...Flevy.com Best Practices
 
Six Sigma - Statistical Process Control (SPC)
Six Sigma - Statistical Process Control (SPC)Six Sigma - Statistical Process Control (SPC)
Six Sigma - Statistical Process Control (SPC)Flevy.com Best Practices
 
Lean Six Sigma - Process Risk Analysis (FMEA)
Lean Six Sigma - Process Risk Analysis (FMEA)Lean Six Sigma - Process Risk Analysis (FMEA)
Lean Six Sigma - Process Risk Analysis (FMEA)Flevy.com Best Practices
 
Effective Staff Suggestion System (Kaizen Teian)
Effective Staff Suggestion System (Kaizen Teian)Effective Staff Suggestion System (Kaizen Teian)
Effective Staff Suggestion System (Kaizen Teian)Flevy.com Best Practices
 

Plus de Flevy.com Best Practices (20)

[Whitepaper] 8 Key Steps of Data Integration: Restructuring Redeployment Asse...
[Whitepaper] 8 Key Steps of Data Integration: Restructuring Redeployment Asse...[Whitepaper] 8 Key Steps of Data Integration: Restructuring Redeployment Asse...
[Whitepaper] 8 Key Steps of Data Integration: Restructuring Redeployment Asse...
 
[Whitepaper] Strategy Classics: Value Disciplines Model
[Whitepaper] Strategy Classics: Value Disciplines Model[Whitepaper] Strategy Classics: Value Disciplines Model
[Whitepaper] Strategy Classics: Value Disciplines Model
 
[Whitepaper] The Definitive Guide to Strategic Planning: Here’s What You Need...
[Whitepaper] The Definitive Guide to Strategic Planning: Here’s What You Need...[Whitepaper] The Definitive Guide to Strategic Planning: Here’s What You Need...
[Whitepaper] The Definitive Guide to Strategic Planning: Here’s What You Need...
 
[Whitepaper] The Definitive Introduction to Strategy Development and Strategy...
[Whitepaper] The Definitive Introduction to Strategy Development and Strategy...[Whitepaper] The Definitive Introduction to Strategy Development and Strategy...
[Whitepaper] The Definitive Introduction to Strategy Development and Strategy...
 
[Whitepaper] The “Theory of Constraints:” What’s Limiting Your Organization?
[Whitepaper] The “Theory of Constraints:” What’s Limiting Your Organization?[Whitepaper] The “Theory of Constraints:” What’s Limiting Your Organization?
[Whitepaper] The “Theory of Constraints:” What’s Limiting Your Organization?
 
[Whitepaper] Transportation Cost Reduction in Supply Chain Management
[Whitepaper] Transportation Cost Reduction in Supply Chain Management[Whitepaper] Transportation Cost Reduction in Supply Chain Management
[Whitepaper] Transportation Cost Reduction in Supply Chain Management
 
[Whitepaper] A Great Leadership Experience: Dr. Rachid Yazami, Inventor of th...
[Whitepaper] A Great Leadership Experience: Dr. Rachid Yazami, Inventor of th...[Whitepaper] A Great Leadership Experience: Dr. Rachid Yazami, Inventor of th...
[Whitepaper] A Great Leadership Experience: Dr. Rachid Yazami, Inventor of th...
 
[Whitepaper] Finding It Hard to Manage Conflict at the Workplace? Use the Tho...
[Whitepaper] Finding It Hard to Manage Conflict at the Workplace? Use the Tho...[Whitepaper] Finding It Hard to Manage Conflict at the Workplace? Use the Tho...
[Whitepaper] Finding It Hard to Manage Conflict at the Workplace? Use the Tho...
 
[Whitepaper] Key Account Management: Handling Large Global Accounts the Right...
[Whitepaper] Key Account Management: Handling Large Global Accounts the Right...[Whitepaper] Key Account Management: Handling Large Global Accounts the Right...
[Whitepaper] Key Account Management: Handling Large Global Accounts the Right...
 
[Whitepaper] Nudge Theory: An Effective Way to Transform Negative Behaviors
[Whitepaper] Nudge Theory: An Effective Way to Transform Negative Behaviors[Whitepaper] Nudge Theory: An Effective Way to Transform Negative Behaviors
[Whitepaper] Nudge Theory: An Effective Way to Transform Negative Behaviors
 
[Whitepaper] Business Model Innovation: Creation of Scalable Business Models ...
[Whitepaper] Business Model Innovation: Creation of Scalable Business Models ...[Whitepaper] Business Model Innovation: Creation of Scalable Business Models ...
[Whitepaper] Business Model Innovation: Creation of Scalable Business Models ...
 
[Whitepaper] Shareholder Value Traps: How to Evade Them and Focus on Value Cr...
[Whitepaper] Shareholder Value Traps: How to Evade Them and Focus on Value Cr...[Whitepaper] Shareholder Value Traps: How to Evade Them and Focus on Value Cr...
[Whitepaper] Shareholder Value Traps: How to Evade Them and Focus on Value Cr...
 
The Top 101 Consulting Frameworks of 2020
The Top 101 Consulting Frameworks of 2020The Top 101 Consulting Frameworks of 2020
The Top 101 Consulting Frameworks of 2020
 
Six Sigma - Statistical Process Control (SPC)
Six Sigma - Statistical Process Control (SPC)Six Sigma - Statistical Process Control (SPC)
Six Sigma - Statistical Process Control (SPC)
 
Lean Six Sigma - Process Risk Analysis (FMEA)
Lean Six Sigma - Process Risk Analysis (FMEA)Lean Six Sigma - Process Risk Analysis (FMEA)
Lean Six Sigma - Process Risk Analysis (FMEA)
 
Lean Manufacturing
Lean ManufacturingLean Manufacturing
Lean Manufacturing
 
Effective Staff Suggestion System (Kaizen Teian)
Effective Staff Suggestion System (Kaizen Teian)Effective Staff Suggestion System (Kaizen Teian)
Effective Staff Suggestion System (Kaizen Teian)
 
Sales Excellence - Diagnostic Tool
Sales Excellence - Diagnostic ToolSales Excellence - Diagnostic Tool
Sales Excellence - Diagnostic Tool
 
Variance Analysis
Variance AnalysisVariance Analysis
Variance Analysis
 
Change Management Models
Change Management ModelsChange Management Models
Change Management Models
 

Dernier

Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGpr788182
 
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...pujan9679
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon investment
 
GUWAHATI 💋 Call Girl 9827461493 Call Girls in Escort service book now
GUWAHATI 💋 Call Girl 9827461493 Call Girls in  Escort service book nowGUWAHATI 💋 Call Girl 9827461493 Call Girls in  Escort service book now
GUWAHATI 💋 Call Girl 9827461493 Call Girls in Escort service book nowkapoorjyoti4444
 
Pre Engineered Building Manufacturers Hyderabad.pptx
Pre Engineered  Building Manufacturers Hyderabad.pptxPre Engineered  Building Manufacturers Hyderabad.pptx
Pre Engineered Building Manufacturers Hyderabad.pptxRoofing Contractor
 
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...Falcon Invoice Discounting
 
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...meghakumariji156
 
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service AvailableBerhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Availablepr788182
 
New 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck TemplateNew 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck TemplateCannaBusinessPlans
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentationuneakwhite
 
Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfAdmir Softic
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with CultureSeta Wicaksana
 
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistanvineshkumarsajnani12
 
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAIGetting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAITim Wilson
 
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGpr788182
 
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur DubaiUAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubaijaehdlyzca
 

Dernier (20)

Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investors
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
Ooty Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Avail...
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business Growth
 
HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024
 
GUWAHATI 💋 Call Girl 9827461493 Call Girls in Escort service book now
GUWAHATI 💋 Call Girl 9827461493 Call Girls in  Escort service book nowGUWAHATI 💋 Call Girl 9827461493 Call Girls in  Escort service book now
GUWAHATI 💋 Call Girl 9827461493 Call Girls in Escort service book now
 
Pre Engineered Building Manufacturers Hyderabad.pptx
Pre Engineered  Building Manufacturers Hyderabad.pptxPre Engineered  Building Manufacturers Hyderabad.pptx
Pre Engineered Building Manufacturers Hyderabad.pptx
 
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
 
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
Escorts in Nungambakkam Phone 8250092165 Enjoy 24/7 Escort Service Enjoy Your...
 
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service AvailableBerhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
Berhampur Call Girl Just Call 8084732287 Top Class Call Girl Service Available
 
New 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck TemplateNew 2024 Cannabis Edibles Investor Pitch Deck Template
New 2024 Cannabis Edibles Investor Pitch Deck Template
 
Uneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration PresentationUneak White's Personal Brand Exploration Presentation
Uneak White's Personal Brand Exploration Presentation
 
Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024Marel Q1 2024 Investor Presentation from May 8, 2024
Marel Q1 2024 Investor Presentation from May 8, 2024
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
Buy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail AccountsBuy gmail accounts.pdf buy Old Gmail Accounts
Buy gmail accounts.pdf buy Old Gmail Accounts
 
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in PakistanChallenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
Challenges and Opportunities: A Qualitative Study on Tax Compliance in Pakistan
 
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAIGetting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
Getting Real with AI - Columbus DAW - May 2024 - Nick Woo from AlignAI
 
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur DubaiUAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
UAE Bur Dubai Call Girls ☏ 0564401582 Call Girl in Bur Dubai
 

The Complete Guide to DBA Practices & Procedures - Database Performance - Part 11

  • 1. Database Administration: The Complete Guide to Practices and Procedures Chapter 11 Database Performance
  • 2. Partitioning • A database table is a logical manifestation of a set of data that physically resides on storage. • Each DBMS provides different mechanisms for physical files to database tables. • The DBA must decide from among the following mapping options for each table: – Single table to a single file – Single table to multiple files – Multiple tables to a single file This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 3. Raw Partition vs. File System Raw Partition Versus File System DASD SQL Server C A C H E UNIX C A C H E DBMS This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 4. Impact of Adding an Index • The DBA should have an understanding of the access patterns of the table on which the index will be built. • Useful information includes: – the percentage of queries that access rather than update the table – the performance thresholds set within any service level agreements for queries on the table – the impact of adding a new index to running database utilities such as loads, reorganizations, and recovery This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 5. When to Avoid Indexing • When all accesses retrieve every row of the table. – Because every row will be retrieved every time you want to use the table an index (if used) would just add extra I/O and would decrease, not enhance performance. Though not extremely common, you may indeed come across such tables in your organization. • For a very small table with only a few pages of data and no primary key or uniqueness requirements. – A very small table (perhaps 10 or 20 pages) might not need an index because simply reading all of the pages is very efficient already. • When performance doesn't matter and the table is only accessed very infrequently. – But when do you ever have those requirements in the real world? • You may want to avoid indexing variable-length columns. Expansion can cause indexes to consume an inordinate amount of disk space. – However, if variable-length columns are used in SQL WHERE clauses, the cost of disk storage must be compared to the cost of scanning. Buying some extra disk storage is usually cheaper than wasting CPU resources to scan rows. • Low cardinality columns. – For example: GENDER http://db2portal.blogspot.com/2008/09/when-not-to-index.html This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 6. Clustering • A clustered table will store its rows physically on disk in order by a specified column or columns. Clustered vs. Nonclustered Root Index Page 2 30 55 Index Leaf Page 30 Index Leaf Page 2 5 6 7 10 11 13 15 19 22 Data Page Data Page Data Page 2 7 15 Root Index Page 2 14 27 2 5 7 11 Index Leaf Page 14 Index Leaf Page 5 11 23 20 21 2 26 35 7 14 Data Page Data Page Data Page This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 7. General Advice on Clustering • As a rule of thumb: if the DBMS supports clustering, it is usually a good practice to define clustering for each table that is created. – Unless the table is very small. • You can only have one clustering sequence. – When a table has multiple candidates for clustering, weigh the cost of sorting against the performance gained by clustering for each candidate key. • Clustering is generally not recommended for primary key columns because the primary key is, by definition, unique. – However, if ranges of rows frequently are selected and ordered by primary key value, a clustering index may be beneficial.This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 8. Interleaving Data • Also covered earlier (lesson 4). • When data is interleaved, rows from two tables are combined physically in a single physical sequence by a join key. • Interleaving can be used to improve the performance of joins. • Interleaving can be viewed as a specialized form of clustering. This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 9. Determining Correct Free Space The correct amount of free space must be based on the following criteria: • Frequency of inserts and modifications • Amount of sequential versus random access • Impact of accessing unclustered data • Type of processing • Likelihood of row chaining, row migration, and page splits This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 10. File Placement and Allocation • Data placement optimizes access by reducing contention on physical devices. • Must understand the access patterns associated with each piece of data in the system • Specifically allocate the data on physical disk devices in such a way as to optimize performance • However, with modern disk systems such as RAID devices, precise file placement is often difficult, if not impossible to achieve. – More details on RAID is forthcoming in lesson 18. This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 11. Disk Allocation • The DBMS may require disk devices to be allocated for database usage. • Specific commands are provided by each DBMS to initialize physical disk devices. – The disk initialization command will associate a logical name for a physical disk partition or OS file. – After the disk has been initialized, it is stored in the system catalog and can be used for storing table data. • Use meaningful device names to facilitate more efficient usage and management of disk devices. This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 12. Database Reorganization Causes of database disorganization: • Unclustered data. A clustered table or index can become unclustered as data is added and changed. If the data becomes significantly unclustered, queries that were optimized to access data cannot take advantage of the clustering sequence causing performance to suffer. • Fragmentation is a condition in which there are many scattered areas of storage in a database that are too small to be used productively. It results in wasted space, which can hinder performance because additional I/Os are required to retrieve the same data. • Row chaining or row migration occurs when updated data does not fit in the space it currently occupies, and the DBMS must find space for the row. In each case, a pointer is used to locate either the rest of the row or the full row., causing performance to suffer. – With row chaining, the DBMS moves a part of the new, larger row to a location within the tablespace where free space exists. – With row migrations, the full row is placed elsewhere in the tablespace. – IPage splits can cause disorganized databases, too. If the DBMS performs monotonic page splits when it should perform normal page splits, or vice versa, space may be wasted. When space is wasted, fewer rows exist on each page, causing the DBMS to issue more I/O requests to retrieve data. Therefore, once again, performance suffers. • File extents can negatively impact performance. An extent is an additional file that is tied to the original file and can be used only in conjunction with the original file. When the file used by a tablespace runs out of space, an extent is added for the file to expand. This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 13. Reorganize Indexes and Tablespaces • Tablespaces and indexes both can be reorganized. • How the DBA runs a REORG utility depends on the DBMS. – Some DBMS products ship with a built-in reorganization utility. – Others require the customer to purchase the utility. – Still others claim that the customer will not need the utility at all when using their DBMS. • In practice, this last claim is not true. Every DBMS incurs some degree of disorganization as data is added and modified… and can therefore benefit from reorganization. This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 14. Determining When to Reorganize • System catalog statistics can help to determine when to reorganize a database object. • Each DBMS provides a method of reading through the contents of the database and recording statistical information about each database object. • Depending on the DBMS, this statistical information is stored either in the system catalog or in special pages within the database object itself. This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 15. Using Statistics to Schedule Index Reorganization • Index levels • Leaf distance – Distance between leaf pages This document is a partial preview. Full document download can be found on Flevy: http://flevy.com/browse/document/the-complete-guide-to-dba-practices-and-procedures-database-performance-part-11-582
  • 16. 1 Flevy (www.flevy.com) is the marketplace for premium documents. These documents can range from Business Frameworks to Financial Models to PowerPoint Templates. Flevy was founded under the principle that companies waste a lot of time and money recreating the same foundational business documents. Our vision is for Flevy to become a comprehensive knowledge base of business documents. All organizations, from startups to large enterprises, can use Flevy— whether it's to jumpstart projects, to find reference or comparison materials, or just to learn. Contact Us Please contact us with any questions you may have about our company. • General Inquiries support@flevy.com • Media/PR press@flevy.com • Billing billing@flevy.com