SlideShare a Scribd company logo
1 of 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

More Related Content

More from 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
 

More from 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
 

Recently uploaded

The Art of Decision-Making: Navigating Complexity and Uncertainty
The Art of Decision-Making: Navigating Complexity and UncertaintyThe Art of Decision-Making: Navigating Complexity and Uncertainty
The Art of Decision-Making: Navigating Complexity and Uncertaintycapivisgroup
 
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)Adnet Communications
 
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdfProgress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdfHolger Mueller
 
10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf
10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf
10 Influential Leaders Defining the Future of Digital Banking in 2024.pdfciolook1
 
Moradia Isolada com Logradouro; Detached house with patio in Penacova
Moradia Isolada com Logradouro; Detached house with patio in PenacovaMoradia Isolada com Logradouro; Detached house with patio in Penacova
Moradia Isolada com Logradouro; Detached house with patio in Penacovaimostorept
 
NAGPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN NAGPUR ESCORTS SERVICE PROVIDE
NAGPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN NAGPUR ESCORTS SERVICE PROVIDENAGPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN NAGPUR ESCORTS SERVICE PROVIDE
NAGPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN NAGPUR ESCORTS SERVICE PROVIDEkajalroy875762
 
JHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDE
JHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDEJHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDE
JHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDEkajalroy875762
 
Powerpoint showing results from tik tok metrics
Powerpoint showing results from tik tok metricsPowerpoint showing results from tik tok metrics
Powerpoint showing results from tik tok metricsCaitlinCummins3
 
Cracking the 'Career Pathing' Slideshare
Cracking the 'Career Pathing' SlideshareCracking the 'Career Pathing' Slideshare
Cracking the 'Career Pathing' SlideshareWorkforce Group
 
Abortion pills in Jeddah ! +27737758557, cytotec pill riyadh. Saudi Arabia" A...
Abortion pills in Jeddah ! +27737758557, cytotec pill riyadh. Saudi Arabia" A...Abortion pills in Jeddah ! +27737758557, cytotec pill riyadh. Saudi Arabia" A...
Abortion pills in Jeddah ! +27737758557, cytotec pill riyadh. Saudi Arabia" A...bleessingsbender
 
Ital Liptz - all about Itai Liptz. news.
Ital Liptz - all about Itai Liptz. news.Ital Liptz - all about Itai Liptz. news.
Ital Liptz - all about Itai Liptz. news.htj82vpw
 
GURGAON CALL GIRL ❤ 8272964427❤ CALL GIRLS IN GURGAON ESCORTS SERVICE PROVIDE
GURGAON CALL GIRL ❤ 8272964427❤ CALL GIRLS IN GURGAON  ESCORTS SERVICE PROVIDEGURGAON CALL GIRL ❤ 8272964427❤ CALL GIRLS IN GURGAON  ESCORTS SERVICE PROVIDE
GURGAON CALL GIRL ❤ 8272964427❤ CALL GIRLS IN GURGAON ESCORTS SERVICE PROVIDEkajalroy875762
 
PALWAL CALL GIRL ❤ 8272964427❤ CALL GIRLS IN PALWAL ESCORTS
PALWAL CALL GIRL ❤ 8272964427❤ CALL GIRLS IN PALWAL ESCORTSPALWAL CALL GIRL ❤ 8272964427❤ CALL GIRLS IN PALWAL ESCORTS
PALWAL CALL GIRL ❤ 8272964427❤ CALL GIRLS IN PALWAL ESCORTSkajalroy875762
 
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
 
Progress Report - Oracle's OCI Analyst Summit 2024
Progress Report - Oracle's OCI Analyst Summit 2024Progress Report - Oracle's OCI Analyst Summit 2024
Progress Report - Oracle's OCI Analyst Summit 2024Holger Mueller
 
PALWAL CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN PALWAL ESCORTS
PALWAL CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN PALWAL ESCORTSPALWAL CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN PALWAL ESCORTS
PALWAL CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN PALWAL ESCORTSkajalroy875762
 
Mastering The Art Of 'Closing The Sale'.
Mastering The Art Of 'Closing The Sale'.Mastering The Art Of 'Closing The Sale'.
Mastering The Art Of 'Closing The Sale'.SNSW group8
 
Pitch Deck Teardown: Goodcarbon's $5.5m Seed deck
Pitch Deck Teardown: Goodcarbon's $5.5m Seed deckPitch Deck Teardown: Goodcarbon's $5.5m Seed deck
Pitch Deck Teardown: Goodcarbon's $5.5m Seed deckHajeJanKamps
 

Recently uploaded (20)

The Art of Decision-Making: Navigating Complexity and Uncertainty
The Art of Decision-Making: Navigating Complexity and UncertaintyThe Art of Decision-Making: Navigating Complexity and Uncertainty
The Art of Decision-Making: Navigating Complexity and Uncertainty
 
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
Lundin Gold - Q1 2024 Conference Call Presentation (Revised)
 
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdfProgress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
Progress Report - UKG Analyst Summit 2024 - A lot to do - Good Progress1-1.pdf
 
10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf
10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf
10 Influential Leaders Defining the Future of Digital Banking in 2024.pdf
 
Moradia Isolada com Logradouro; Detached house with patio in Penacova
Moradia Isolada com Logradouro; Detached house with patio in PenacovaMoradia Isolada com Logradouro; Detached house with patio in Penacova
Moradia Isolada com Logradouro; Detached house with patio in Penacova
 
NAGPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN NAGPUR ESCORTS SERVICE PROVIDE
NAGPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN NAGPUR ESCORTS SERVICE PROVIDENAGPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN NAGPUR ESCORTS SERVICE PROVIDE
NAGPUR CALL GIRL ❤ 8272964427❤ CALL GIRLS IN NAGPUR ESCORTS SERVICE PROVIDE
 
JHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDE
JHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDEJHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDE
JHANSI CALL GIRL ❤ 8272964427❤ CALL GIRLS IN JHANSI ESCORTS SERVICE PROVIDE
 
Powerpoint showing results from tik tok metrics
Powerpoint showing results from tik tok metricsPowerpoint showing results from tik tok metrics
Powerpoint showing results from tik tok metrics
 
Cracking the 'Career Pathing' Slideshare
Cracking the 'Career Pathing' SlideshareCracking the 'Career Pathing' Slideshare
Cracking the 'Career Pathing' Slideshare
 
Abortion pills in Jeddah ! +27737758557, cytotec pill riyadh. Saudi Arabia" A...
Abortion pills in Jeddah ! +27737758557, cytotec pill riyadh. Saudi Arabia" A...Abortion pills in Jeddah ! +27737758557, cytotec pill riyadh. Saudi Arabia" A...
Abortion pills in Jeddah ! +27737758557, cytotec pill riyadh. Saudi Arabia" A...
 
Ital Liptz - all about Itai Liptz. news.
Ital Liptz - all about Itai Liptz. news.Ital Liptz - all about Itai Liptz. news.
Ital Liptz - all about Itai Liptz. news.
 
GURGAON CALL GIRL ❤ 8272964427❤ CALL GIRLS IN GURGAON ESCORTS SERVICE PROVIDE
GURGAON CALL GIRL ❤ 8272964427❤ CALL GIRLS IN GURGAON  ESCORTS SERVICE PROVIDEGURGAON CALL GIRL ❤ 8272964427❤ CALL GIRLS IN GURGAON  ESCORTS SERVICE PROVIDE
GURGAON CALL GIRL ❤ 8272964427❤ CALL GIRLS IN GURGAON ESCORTS SERVICE PROVIDE
 
Learn How To Start Buy Verified Payoneer Accounts
Learn How To Start Buy Verified Payoneer AccountsLearn How To Start Buy Verified Payoneer Accounts
Learn How To Start Buy Verified Payoneer Accounts
 
PALWAL CALL GIRL ❤ 8272964427❤ CALL GIRLS IN PALWAL ESCORTS
PALWAL CALL GIRL ❤ 8272964427❤ CALL GIRLS IN PALWAL ESCORTSPALWAL CALL GIRL ❤ 8272964427❤ CALL GIRLS IN PALWAL ESCORTS
PALWAL CALL GIRL ❤ 8272964427❤ CALL GIRLS IN PALWAL ESCORTS
 
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
 
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
 
Progress Report - Oracle's OCI Analyst Summit 2024
Progress Report - Oracle's OCI Analyst Summit 2024Progress Report - Oracle's OCI Analyst Summit 2024
Progress Report - Oracle's OCI Analyst Summit 2024
 
PALWAL CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN PALWAL ESCORTS
PALWAL CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN PALWAL ESCORTSPALWAL CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN PALWAL ESCORTS
PALWAL CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN PALWAL ESCORTS
 
Mastering The Art Of 'Closing The Sale'.
Mastering The Art Of 'Closing The Sale'.Mastering The Art Of 'Closing The Sale'.
Mastering The Art Of 'Closing The Sale'.
 
Pitch Deck Teardown: Goodcarbon's $5.5m Seed deck
Pitch Deck Teardown: Goodcarbon's $5.5m Seed deckPitch Deck Teardown: Goodcarbon's $5.5m Seed deck
Pitch Deck Teardown: Goodcarbon's $5.5m Seed deck
 

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