SlideShare une entreprise Scribd logo
1  sur  14
Database Administration:
The Complete Guide to Practices and Procedures
Chapter 12
Application Performance
Designing Applications
for Relational Access
Design issues to examine when application performance suffers:
• Type of SQL. Is the correct type of SQL (planned or unplanned, dynamic or
static, embedded or stand-alone) being used for this particular application?
• Programming language. Is the programming language capable of achieving
the required performance, and is the language optimized for database access?
• Transaction design and processing. Are the transactions within the program
properly designed to assure ACID properties, and does the program use the
transaction processor of choice appropriately and efficiently?
• Locking strategy. Does the application hold the wrong type of locks, or does it
hold the correct type of locks for too long?
• COMMIT strategy. Does each application program issue SQL COMMIT
statements to minimize the impact of locking?
• Batch processing. Are batch programs designed appropriately to take
advantage of the sequential processing features of the DBMS?
• Online processing. Are online applications designed to return useful
information and to minimize the amount of information returned to the user’s
screen for a single invocation of the program?
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-application-performance-part-12-583
Physical Data Independence
• Relational optimization allows queries to adapt to
a changing database environment.
• The optimizer can react to changes by
formulating new access paths without requiring
application coding changes to be implemented.
– The application can therefore be flexible as tables
expand or contract in size, as indexes are added or
removed, and as the database becomes disorganized
or reorganized.
• This separation of access criteria from physical
storage characteristics is called physical data
independence.
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-application-performance-part-12-583
Test vs. Production Statistics
• When testing applications against test
databases there will be less data
– So statistics will not match production
• You can copy production statistics and
populate them into the test
system to simulate production
access paths, thoughThis 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-application-performance-part-12-583
Access Path Choices
• Table Scans
• Indexed Access
– Direct index lookup
– Matching index scan
– Non-matching index scan
– Index screening
– Index only access
– Using indexes to avoid sorting
• Hashed Access
• Parallel Access
– I/O, CPU, system
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-application-performance-part-12-583
Rule-Based Optimization
• Most relational optimizers are cost based,
meaning they formulate access paths based
on an estimation of costs.
– Lower-cost favored over costlier access paths.
• Some DBMSs support a optimization based on
heuristics, or rules.
– Oracle provides both cost-based and rule-based
optimization.
• But Oracle is phasing out the rules-based optimizer.
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-application-performance-part-12-583
Visual Explain Tools
• Instead of interpreting coded values in a Plan Table, a Visual
Explain tool diagrams access paths pictorially.
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-application-performance-part-12-583
SQL Coding and Tuning for Efficiency
1. Identify the business data requirements
2. Ensure that the required data is available within existing
databases
3. Translate the business requirements into SQL
4. Test the SQL for accuracy and results
5. Review the access paths for performance
6. Tweak the SQL for better access paths
7. Code optimization hints
8. Repeat steps 4 through 7 until performance is acceptable.
9. Repeat step 8 whenever performance problems arise or a
new DBMS version is installed
10. Repeat entire process whenever business needs change
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-application-performance-part-12-583
Be Careful What You Ask For
• The arrangement of elements within a query
can change query performance.
• Place the most restrictive predicate where the
optimizer can read it first.
– Enables the optimizer to
narrow down the first set
of results before proceeding
to the next predicateThis 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-application-performance-part-12-583
Avoid Cartesian Products
• Cartesian Product -> every row in one table is
joined to every row in another table with no
join criteria.
– The results of a Cartesian product are difficult to
interpret.
• Always provide join predicates.
• Failure to do so will result in severe
performance degradation and possibly
incorrect results.
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-application-performance-part-12-583
Avoid Sorts When Possible
• When performance is important, remember to
look for sorts and find ways to eliminate them.
• You can use indexes to avoid sorts for certain SQL
constructs in most relational DBMSs:
– ORDER BY
– GROUP BY
– DISTINCT
– UNION
– INTERSECT
– EXCEPT
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-application-performance-part-12-583
Beware of Code Generators
• Application code generators and similar tools that
automatically create SQL can create “bad” SQL… and
usually do.
– Keep an eye on the SQL generated by such tools and re-
write poorly written SQL before it reaches production.
• Some of these tools use gateways that require each
SQL statement to be recompiled and optimized each
time it is requested.
• Utilize the gateway’s a caching mechanism to store
compiled and optimized SQL on the server.
– Such a cache can be help to improve performance for
frequently recurring SQL statements.
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-application-performance-part-12-583
Indentifying Poorly Performing SQL
• A large part of the task of tuning SQL is
identifying the offending code.
• Acquire and use a SQL performance monitor
to constantly monitor the DBMS for sub-
optimal SQL statements.
• Identify the worst SQL and fix.
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-application-performance-part-12-583
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

VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...Suhani Kapoor
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyEthan lee
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdfRenandantas16
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxpriyanshujha201
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Roland Driesen
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...Any kyc Account
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear RegressionRavindra Nath Shukla
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataExhibitors Data
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdftbatkhuu1
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Roland Driesen
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insightsseri bangash
 

Dernier (20)

VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
VIP Call Girls Gandi Maisamma ( Hyderabad ) Phone 8250192130 | ₹5k To 25k Wit...
 
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case studyThe Coffee Bean & Tea Leaf(CBTL), Business strategy case study
The Coffee Bean & Tea Leaf(CBTL), Business strategy case study
 
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf0183760ssssssssssssssssssssssssssss00101011 (27).pdf
0183760ssssssssssssssssssssssssssss00101011 (27).pdf
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...Ensure the security of your HCL environment by applying the Zero Trust princi...
Ensure the security of your HCL environment by applying the Zero Trust princi...
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
KYC-Verified Accounts: Helping Companies Handle Challenging Regulatory Enviro...
 
Regression analysis: Simple Linear Regression Multiple Linear Regression
Regression analysis:  Simple Linear Regression Multiple Linear RegressionRegression analysis:  Simple Linear Regression Multiple Linear Regression
Regression analysis: Simple Linear Regression Multiple Linear Regression
 
RSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors DataRSA Conference Exhibitor List 2024 - Exhibitors Data
RSA Conference Exhibitor List 2024 - Exhibitors Data
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
A305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdfA305_A2_file_Batkhuu progress report.pdf
A305_A2_file_Batkhuu progress report.pdf
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...Boost the utilization of your HCL environment by reevaluating use cases and f...
Boost the utilization of your HCL environment by reevaluating use cases and f...
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Understanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key InsightsUnderstanding the Pakistan Budgeting Process: Basics and Key Insights
Understanding the Pakistan Budgeting Process: Basics and Key Insights
 

The Complete Guide to DBA Practices & Procedures - Application Performance Part 12

  • 1. Database Administration: The Complete Guide to Practices and Procedures Chapter 12 Application Performance
  • 2. Designing Applications for Relational Access Design issues to examine when application performance suffers: • Type of SQL. Is the correct type of SQL (planned or unplanned, dynamic or static, embedded or stand-alone) being used for this particular application? • Programming language. Is the programming language capable of achieving the required performance, and is the language optimized for database access? • Transaction design and processing. Are the transactions within the program properly designed to assure ACID properties, and does the program use the transaction processor of choice appropriately and efficiently? • Locking strategy. Does the application hold the wrong type of locks, or does it hold the correct type of locks for too long? • COMMIT strategy. Does each application program issue SQL COMMIT statements to minimize the impact of locking? • Batch processing. Are batch programs designed appropriately to take advantage of the sequential processing features of the DBMS? • Online processing. Are online applications designed to return useful information and to minimize the amount of information returned to the user’s screen for a single invocation of the program? 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-application-performance-part-12-583
  • 3. Physical Data Independence • Relational optimization allows queries to adapt to a changing database environment. • The optimizer can react to changes by formulating new access paths without requiring application coding changes to be implemented. – The application can therefore be flexible as tables expand or contract in size, as indexes are added or removed, and as the database becomes disorganized or reorganized. • This separation of access criteria from physical storage characteristics is called physical data independence. 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-application-performance-part-12-583
  • 4. Test vs. Production Statistics • When testing applications against test databases there will be less data – So statistics will not match production • You can copy production statistics and populate them into the test system to simulate production access paths, thoughThis 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-application-performance-part-12-583
  • 5. Access Path Choices • Table Scans • Indexed Access – Direct index lookup – Matching index scan – Non-matching index scan – Index screening – Index only access – Using indexes to avoid sorting • Hashed Access • Parallel Access – I/O, CPU, system 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-application-performance-part-12-583
  • 6. Rule-Based Optimization • Most relational optimizers are cost based, meaning they formulate access paths based on an estimation of costs. – Lower-cost favored over costlier access paths. • Some DBMSs support a optimization based on heuristics, or rules. – Oracle provides both cost-based and rule-based optimization. • But Oracle is phasing out the rules-based optimizer. 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-application-performance-part-12-583
  • 7. Visual Explain Tools • Instead of interpreting coded values in a Plan Table, a Visual Explain tool diagrams access paths pictorially. 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-application-performance-part-12-583
  • 8. SQL Coding and Tuning for Efficiency 1. Identify the business data requirements 2. Ensure that the required data is available within existing databases 3. Translate the business requirements into SQL 4. Test the SQL for accuracy and results 5. Review the access paths for performance 6. Tweak the SQL for better access paths 7. Code optimization hints 8. Repeat steps 4 through 7 until performance is acceptable. 9. Repeat step 8 whenever performance problems arise or a new DBMS version is installed 10. Repeat entire process whenever business needs change 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-application-performance-part-12-583
  • 9. Be Careful What You Ask For • The arrangement of elements within a query can change query performance. • Place the most restrictive predicate where the optimizer can read it first. – Enables the optimizer to narrow down the first set of results before proceeding to the next predicateThis 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-application-performance-part-12-583
  • 10. Avoid Cartesian Products • Cartesian Product -> every row in one table is joined to every row in another table with no join criteria. – The results of a Cartesian product are difficult to interpret. • Always provide join predicates. • Failure to do so will result in severe performance degradation and possibly incorrect results. 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-application-performance-part-12-583
  • 11. Avoid Sorts When Possible • When performance is important, remember to look for sorts and find ways to eliminate them. • You can use indexes to avoid sorts for certain SQL constructs in most relational DBMSs: – ORDER BY – GROUP BY – DISTINCT – UNION – INTERSECT – EXCEPT 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-application-performance-part-12-583
  • 12. Beware of Code Generators • Application code generators and similar tools that automatically create SQL can create “bad” SQL… and usually do. – Keep an eye on the SQL generated by such tools and re- write poorly written SQL before it reaches production. • Some of these tools use gateways that require each SQL statement to be recompiled and optimized each time it is requested. • Utilize the gateway’s a caching mechanism to store compiled and optimized SQL on the server. – Such a cache can be help to improve performance for frequently recurring SQL statements. 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-application-performance-part-12-583
  • 13. Indentifying Poorly Performing SQL • A large part of the task of tuning SQL is identifying the offending code. • Acquire and use a SQL performance monitor to constantly monitor the DBMS for sub- optimal SQL statements. • Identify the worst SQL and fix. 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-application-performance-part-12-583
  • 14. 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