SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA
HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH
Designing for Performance:
Database Related Worst Practices
Christian Antognini
@ChrisAntognini
Designing for Performance: Database Related Worst Practices2 9/2/2015
Senior principal consultant, trainer and partner
at Trivadis in Zurich (CH)
christian.antognini@trivadis.com
http://antognini.ch
Focus: get the most out of Oracle Database
Logical and physical database design
Query optimizer
Application performance management
Author of Troubleshooting Oracle Performance (Apress, 2008/14)
OakTable Network, Oracle ACE Director
Agenda
Designing for Performance: Database Related Worst Practices3 9/2/2015
1. Introduction
2. Worst Practices
3. Core Messages
Designing for Performance: Database Related Worst Practices4 9/2/2015
Introduction
Where Does This Information Come From?
Designing for Performance: Database Related Worst Practices5 9/2/2015
Personal experience!
I spent most of the last 15 years troubleshooting performance problems.
Hundreds of different projects and applications
A number of industries were involved
According to my experience, most of the database-related performance
problems are caused by a limited number of issues.
In this presentation I cover the top 10
Even though some of them may seem very basic, do not underestimate the number
of systems that are now running and suffering because of them!
Why It’s Important?
Designing for Performance: Database Related Worst Practices6 9/2/2015
Many performance problems can be
avoided with sound planning and
design.
Do the right thing!
There is a widespread lack of
knowledge in our industry!
The same mistakes are made again
and again.
“To err is human, to persist in it, is
diabolical” – Seneca
Designing for Performance: Database Related Worst Practices7 9/2/2015
Source: @peter_berner
It’s not Premature Optimization!
Designing for Performance: Database Related Worst Practices8 9/2/2015
“Premature optimization is the root of all evil” – Donald Knuth
The misconception based on that particular quote is that a developer, while
writing code, should ignore optimization altogether.
In my opinion, this interpretation is wrong!
My take:
Developers should avoid micro optimizations that have local impact.
Developers should care about optimizations that have global impact, like the design
of a system, the algorithms used to implement the required functionality, or in which
layer a specific processing should be performed.
Designing for Performance: Database Related Worst Practices9 9/2/2015
Worst Practices
Lack of Logical Database Design
Designing for Performance: Database Related Worst Practices10 9/2/2015
Once upon a time, it was considered obvious that one should have a data
architect involved in every development project.
Today, unfortunately, too often I see projects in which no formal database
design is done.
The database is considered a dumb device.
The logical database design depends on the target database engine.
Schema-on-write vs schema-on-read
Implementing Generic Tables
Designing for Performance: Database Related Worst Practices11 9/2/2015
In the quest of flexibility, generic database designs are implemented.
Entity-attribute-value models
XML-based designs
Flexibility is tied to performance!
In some situations suboptimal performance might be good enough.
In other situations it might be catastrophic.
Not Using Constraints to Enforce Data Integrity
Designing for Performance: Database Related Worst Practices12 9/2/2015
Constraints are not only fundamental to guarantee data integrity, but they are
also extensively used by query optimizers during the generation of execution
plans.
Cons of checking the constraints at the application level:
More code being written and tested
Potential problems with data integrity
Greater consumption of resources (not always)
Leads to less scalable locking schemes (not always)
Lack of Physical Database Design
Designing for Performance: Database Related Worst Practices13 9/2/2015
It is not uncommon to see projects where the logical design is directly
mapped to the physical design.
The physical database design depends on target database engine.
Heap tables, clustered tables, IOT
Many type of indexes exist
Data partitioning
Do not forget to define and implement a data-archiving concept.
Not Choosing the Right Data Type
Designing for Performance: Database Related Worst Practices14 9/2/2015
In recent years, I have witnessed a disturbing trend in physical database
design: wrong datatype selection.
E.g. VARCHAR2 instead of DATE or TIMESTAMP
There are four main problems related to wrong datatype selection:
Wrong or lacking validation of data
Loss of information
Things do not work as expected
Query optimizer anomalies
Not Using Bind Variables Correctly
Designing for Performance: Database Related Worst Practices15 9/2/2015
From a performance point of view, bind variables introduce both an
advantage and a disadvantage.
Only applies to database engines having a cursor cache.
The advantage of using bind variables is that they allow the sharing of
cursors.
The disadvantage of using bind variables in WHERE clauses, and only in
WHERE clauses, is that crucial information is sometimes hidden from the
query optimizer.
From a security point of view, bind variables prevent the risks associated with
SQL injection.
Not Using Advanced Database Features
Designing for Performance: Database Related Worst Practices16 9/2/2015
High-end database engines provide many advanced features that can
drastically reduce development costs while boosting performance.
E.g. data-centric processing should take place as closely as possible to the data
Leverage your investment by taking advantage of those features as much as
possible.
Most of the time, database-independent applications are not required.
I would recommend to develop a database-independent application only when there
are very good reasons for doing it.
Companies are more likely to change the whole application before changing just the
database engine.
Performing Unnecessary Commits
Designing for Performance: Database Related Worst Practices17 9/2/2015
Commits are operations that call for serialization.
Every operation that leads to serialization inhibits scalability.
Serialization is unwanted and should be minimized as much as possible.
Steadily Opening and Closing Database Connections
Designing for Performance: Database Related Worst Practices18 9/2/2015
Opening a database connection that in turn starts an associated process or
thread on the database server is not a lightweight operation.
Do not underestimate the amount of time and resources required.
A worst-case scenario that I sometimes observe is a web application that opens and
closes a database connection for every request that involves a database access.
Using a pool of connections is of paramount importance.
Opening Too Many Database Connections
Designing for Performance: Database Related Worst Practices19 9/2/2015
A database connection that as an associated process or thread on the
database server is not a lightweight resource.
A processor core cannot efficiently handle many concurrent processes or
threads.
Using a pool of connections of limited size is of paramount importance.
Designing for Performance: Database Related Worst Practices20 9/2/2015
Core Messages
Designing for Performance: Database Related Worst Practices21 9/2/2015
Let’s Face it, Information Technology Is Expensive!
Simple solutions
for simple problems,
elegant solutions
for complex problems.
One Size Fits All?
Designing for Performance: Database Related Worst Practices22 9/2/2015
Use the right tool
for the right job.
Designing for Performance: Database Related Worst Practices23 9/2/2015
Performance Is Not an Option
Optimal performance is not simply a product one can buy
but rather the results of an accurate planning and
a correct implementation.
Questions and Answers
Christian Antognini
Senior Principal Consultant
christian.antognini@trivadis.com
9/2/2015 Designing for Performance: Database Related Worst Practices24

Weitere Àhnliche Inhalte

Andere mochten auch

Oracle Database In-Memory
Oracle Database In-MemoryOracle Database In-Memory
Oracle Database In-MemoryTrivadis
 
Database application and design
Database application and designDatabase application and design
Database application and designsieedah
 
JOOX - Java Object Oriented XML
JOOX - Java Object Oriented XMLJOOX - Java Object Oriented XML
JOOX - Java Object Oriented XMLJakub Kubrynski
 
Generating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerGenerating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerRob van den Berg
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Aaron Shilo
 
Best Practices for Database Schema Design
Best Practices for Database Schema DesignBest Practices for Database Schema Design
Best Practices for Database Schema DesignIron Speed
 
Online Banking Project
Online Banking ProjectOnline Banking Project
Online Banking ProjectM.Saber
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Guy Harrison
 
Software Engineering ppt
Software Engineering pptSoftware Engineering ppt
Software Engineering pptshruths2890
 
Database Design Project-Oracle 11g
Database Design  Project-Oracle 11g Database Design  Project-Oracle 11g
Database Design Project-Oracle 11g Sunny U Okoro
 

Andere mochten auch (10)

Oracle Database In-Memory
Oracle Database In-MemoryOracle Database In-Memory
Oracle Database In-Memory
 
Database application and design
Database application and designDatabase application and design
Database application and design
 
JOOX - Java Object Oriented XML
JOOX - Java Object Oriented XMLJOOX - Java Object Oriented XML
JOOX - Java Object Oriented XML
 
Generating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data ModelerGenerating Code with Oracle SQL Developer Data Modeler
Generating Code with Oracle SQL Developer Data Modeler
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 
Best Practices for Database Schema Design
Best Practices for Database Schema DesignBest Practices for Database Schema Design
Best Practices for Database Schema Design
 
Online Banking Project
Online Banking ProjectOnline Banking Project
Online Banking Project
 
Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)Top 10 tips for Oracle performance (Updated April 2015)
Top 10 tips for Oracle performance (Updated April 2015)
 
Software Engineering ppt
Software Engineering pptSoftware Engineering ppt
Software Engineering ppt
 
Database Design Project-Oracle 11g
Database Design  Project-Oracle 11g Database Design  Project-Oracle 11g
Database Design Project-Oracle 11g
 

Ähnlich wie Designing for Performance: Database Related Worst Practices

Designing for performance: Database Related Worst Practices
Designing for performance: Database Related Worst PracticesDesigning for performance: Database Related Worst Practices
Designing for performance: Database Related Worst PracticesTrivadis
 
Data kitchen 7 agile steps - big data fest 9-18-2015
Data kitchen   7 agile steps - big data fest 9-18-2015Data kitchen   7 agile steps - big data fest 9-18-2015
Data kitchen 7 agile steps - big data fest 9-18-2015DataKitchen
 
The Evolution of a Scrappy Startup to a Successful Web Service
The Evolution of a Scrappy Startup to a Successful Web ServiceThe Evolution of a Scrappy Startup to a Successful Web Service
The Evolution of a Scrappy Startup to a Successful Web ServicePoornima Vijayashanker
 
The Growth Of Data Centers
The Growth Of Data CentersThe Growth Of Data Centers
The Growth Of Data CentersGina Buck
 
engage 2015 - - 2015 - Infrastructure Assessment - Analyze, Visualize and Op...
engage 2015 -  - 2015 - Infrastructure Assessment - Analyze, Visualize and Op...engage 2015 -  - 2015 - Infrastructure Assessment - Analyze, Visualize and Op...
engage 2015 - - 2015 - Infrastructure Assessment - Analyze, Visualize and Op...Christoph Adler
 
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Daniel Zivkovic
 
Short reference architecture
Short reference architectureShort reference architecture
Short reference architectureSteve Feldman
 
Thinking Outside the Cube: How In-Memory Bolsters Analytics
Thinking Outside the Cube: How In-Memory Bolsters AnalyticsThinking Outside the Cube: How In-Memory Bolsters Analytics
Thinking Outside the Cube: How In-Memory Bolsters AnalyticsInside Analysis
 
Best Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
Best Laid Plans: Saving Time, Money and Trouble with Optimal ForecastingBest Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
Best Laid Plans: Saving Time, Money and Trouble with Optimal ForecastingEric Kavanagh
 
Understanding DataOps and Its Impact on Application Quality
Understanding DataOps and Its Impact on Application QualityUnderstanding DataOps and Its Impact on Application Quality
Understanding DataOps and Its Impact on Application QualityDevOps.com
 
ICS UserGroup - 2015 - Infrastructure Assessment - Analyze, Visualize and Opt...
ICS UserGroup - 2015 - Infrastructure Assessment - Analyze, Visualize and Opt...ICS UserGroup - 2015 - Infrastructure Assessment - Analyze, Visualize and Opt...
ICS UserGroup - 2015 - Infrastructure Assessment - Analyze, Visualize and Opt...Christoph Adler
 
Matthew Johnston - Big Data Futures Outlook BCM
Matthew Johnston - Big Data Futures Outlook BCMMatthew Johnston - Big Data Futures Outlook BCM
Matthew Johnston - Big Data Futures Outlook BCMHoi Lan Leong
 
From NASA to Startups to Big Commerce
From NASA to Startups to Big CommerceFrom NASA to Startups to Big Commerce
From NASA to Startups to Big CommerceDaniel Greenfeld
 
Data Engineer's Lunch #85: Designing a Modern Data Stack
Data Engineer's Lunch #85: Designing a Modern Data StackData Engineer's Lunch #85: Designing a Modern Data Stack
Data Engineer's Lunch #85: Designing a Modern Data StackAnant Corporation
 
OSTHUS-Allotrope presents "Laboratory Informatics Strategy" at SmartLab 2015
OSTHUS-Allotrope presents "Laboratory Informatics Strategy" at SmartLab 2015OSTHUS-Allotrope presents "Laboratory Informatics Strategy" at SmartLab 2015
OSTHUS-Allotrope presents "Laboratory Informatics Strategy" at SmartLab 2015OSTHUS
 
load speed problems of web resources on the client side classification and ...
 load speed problems of web resources on the client side  classification and ... load speed problems of web resources on the client side  classification and ...
load speed problems of web resources on the client side classification and ...INFOGAIN PUBLICATION
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database RoundtableEric Kavanagh
 
How to choose the best frontend framework in 2022
How to choose the best frontend framework in 2022How to choose the best frontend framework in 2022
How to choose the best frontend framework in 2022Katy Slemon
 

Ähnlich wie Designing for Performance: Database Related Worst Practices (20)

Designing for performance: Database Related Worst Practices
Designing for performance: Database Related Worst PracticesDesigning for performance: Database Related Worst Practices
Designing for performance: Database Related Worst Practices
 
Data kitchen 7 agile steps - big data fest 9-18-2015
Data kitchen   7 agile steps - big data fest 9-18-2015Data kitchen   7 agile steps - big data fest 9-18-2015
Data kitchen 7 agile steps - big data fest 9-18-2015
 
The Evolution of a Scrappy Startup to a Successful Web Service
The Evolution of a Scrappy Startup to a Successful Web ServiceThe Evolution of a Scrappy Startup to a Successful Web Service
The Evolution of a Scrappy Startup to a Successful Web Service
 
The Growth Of Data Centers
The Growth Of Data CentersThe Growth Of Data Centers
The Growth Of Data Centers
 
engage 2015 - - 2015 - Infrastructure Assessment - Analyze, Visualize and Op...
engage 2015 -  - 2015 - Infrastructure Assessment - Analyze, Visualize and Op...engage 2015 -  - 2015 - Infrastructure Assessment - Analyze, Visualize and Op...
engage 2015 - - 2015 - Infrastructure Assessment - Analyze, Visualize and Op...
 
Streaming is a Detail
Streaming is a DetailStreaming is a Detail
Streaming is a Detail
 
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
Canadian Experts Discuss Modern Data Stacks and Cloud Computing for 5 Years o...
 
Short reference architecture
Short reference architectureShort reference architecture
Short reference architecture
 
Thinking Outside the Cube: How In-Memory Bolsters Analytics
Thinking Outside the Cube: How In-Memory Bolsters AnalyticsThinking Outside the Cube: How In-Memory Bolsters Analytics
Thinking Outside the Cube: How In-Memory Bolsters Analytics
 
Isset Presentation @ EECI2009
Isset Presentation @ EECI2009Isset Presentation @ EECI2009
Isset Presentation @ EECI2009
 
Best Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
Best Laid Plans: Saving Time, Money and Trouble with Optimal ForecastingBest Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
Best Laid Plans: Saving Time, Money and Trouble with Optimal Forecasting
 
Understanding DataOps and Its Impact on Application Quality
Understanding DataOps and Its Impact on Application QualityUnderstanding DataOps and Its Impact on Application Quality
Understanding DataOps and Its Impact on Application Quality
 
ICS UserGroup - 2015 - Infrastructure Assessment - Analyze, Visualize and Opt...
ICS UserGroup - 2015 - Infrastructure Assessment - Analyze, Visualize and Opt...ICS UserGroup - 2015 - Infrastructure Assessment - Analyze, Visualize and Opt...
ICS UserGroup - 2015 - Infrastructure Assessment - Analyze, Visualize and Opt...
 
Matthew Johnston - Big Data Futures Outlook BCM
Matthew Johnston - Big Data Futures Outlook BCMMatthew Johnston - Big Data Futures Outlook BCM
Matthew Johnston - Big Data Futures Outlook BCM
 
From NASA to Startups to Big Commerce
From NASA to Startups to Big CommerceFrom NASA to Startups to Big Commerce
From NASA to Startups to Big Commerce
 
Data Engineer's Lunch #85: Designing a Modern Data Stack
Data Engineer's Lunch #85: Designing a Modern Data StackData Engineer's Lunch #85: Designing a Modern Data Stack
Data Engineer's Lunch #85: Designing a Modern Data Stack
 
OSTHUS-Allotrope presents "Laboratory Informatics Strategy" at SmartLab 2015
OSTHUS-Allotrope presents "Laboratory Informatics Strategy" at SmartLab 2015OSTHUS-Allotrope presents "Laboratory Informatics Strategy" at SmartLab 2015
OSTHUS-Allotrope presents "Laboratory Informatics Strategy" at SmartLab 2015
 
load speed problems of web resources on the client side classification and ...
 load speed problems of web resources on the client side  classification and ... load speed problems of web resources on the client side  classification and ...
load speed problems of web resources on the client side classification and ...
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database Roundtable
 
How to choose the best frontend framework in 2022
How to choose the best frontend framework in 2022How to choose the best frontend framework in 2022
How to choose the best frontend framework in 2022
 

KĂŒrzlich hochgeladen

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...gurkirankumar98700
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

KĂŒrzlich hochgeladen (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍾 8923113531 🎰 Avail...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Designing for Performance: Database Related Worst Practices

  • 1. BASLE BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH Designing for Performance: Database Related Worst Practices Christian Antognini
  • 2. @ChrisAntognini Designing for Performance: Database Related Worst Practices2 9/2/2015 Senior principal consultant, trainer and partner at Trivadis in Zurich (CH) christian.antognini@trivadis.com http://antognini.ch Focus: get the most out of Oracle Database Logical and physical database design Query optimizer Application performance management Author of Troubleshooting Oracle Performance (Apress, 2008/14) OakTable Network, Oracle ACE Director
  • 3. Agenda Designing for Performance: Database Related Worst Practices3 9/2/2015 1. Introduction 2. Worst Practices 3. Core Messages
  • 4. Designing for Performance: Database Related Worst Practices4 9/2/2015 Introduction
  • 5. Where Does This Information Come From? Designing for Performance: Database Related Worst Practices5 9/2/2015 Personal experience! I spent most of the last 15 years troubleshooting performance problems. Hundreds of different projects and applications A number of industries were involved According to my experience, most of the database-related performance problems are caused by a limited number of issues. In this presentation I cover the top 10 Even though some of them may seem very basic, do not underestimate the number of systems that are now running and suffering because of them!
  • 6. Why It’s Important? Designing for Performance: Database Related Worst Practices6 9/2/2015 Many performance problems can be avoided with sound planning and design. Do the right thing! There is a widespread lack of knowledge in our industry! The same mistakes are made again and again. “To err is human, to persist in it, is diabolical” – Seneca
  • 7. Designing for Performance: Database Related Worst Practices7 9/2/2015 Source: @peter_berner
  • 8. It’s not Premature Optimization! Designing for Performance: Database Related Worst Practices8 9/2/2015 “Premature optimization is the root of all evil” – Donald Knuth The misconception based on that particular quote is that a developer, while writing code, should ignore optimization altogether. In my opinion, this interpretation is wrong! My take: Developers should avoid micro optimizations that have local impact. Developers should care about optimizations that have global impact, like the design of a system, the algorithms used to implement the required functionality, or in which layer a specific processing should be performed.
  • 9. Designing for Performance: Database Related Worst Practices9 9/2/2015 Worst Practices
  • 10. Lack of Logical Database Design Designing for Performance: Database Related Worst Practices10 9/2/2015 Once upon a time, it was considered obvious that one should have a data architect involved in every development project. Today, unfortunately, too often I see projects in which no formal database design is done. The database is considered a dumb device. The logical database design depends on the target database engine. Schema-on-write vs schema-on-read
  • 11. Implementing Generic Tables Designing for Performance: Database Related Worst Practices11 9/2/2015 In the quest of flexibility, generic database designs are implemented. Entity-attribute-value models XML-based designs Flexibility is tied to performance! In some situations suboptimal performance might be good enough. In other situations it might be catastrophic.
  • 12. Not Using Constraints to Enforce Data Integrity Designing for Performance: Database Related Worst Practices12 9/2/2015 Constraints are not only fundamental to guarantee data integrity, but they are also extensively used by query optimizers during the generation of execution plans. Cons of checking the constraints at the application level: More code being written and tested Potential problems with data integrity Greater consumption of resources (not always) Leads to less scalable locking schemes (not always)
  • 13. Lack of Physical Database Design Designing for Performance: Database Related Worst Practices13 9/2/2015 It is not uncommon to see projects where the logical design is directly mapped to the physical design. The physical database design depends on target database engine. Heap tables, clustered tables, IOT Many type of indexes exist Data partitioning Do not forget to define and implement a data-archiving concept.
  • 14. Not Choosing the Right Data Type Designing for Performance: Database Related Worst Practices14 9/2/2015 In recent years, I have witnessed a disturbing trend in physical database design: wrong datatype selection. E.g. VARCHAR2 instead of DATE or TIMESTAMP There are four main problems related to wrong datatype selection: Wrong or lacking validation of data Loss of information Things do not work as expected Query optimizer anomalies
  • 15. Not Using Bind Variables Correctly Designing for Performance: Database Related Worst Practices15 9/2/2015 From a performance point of view, bind variables introduce both an advantage and a disadvantage. Only applies to database engines having a cursor cache. The advantage of using bind variables is that they allow the sharing of cursors. The disadvantage of using bind variables in WHERE clauses, and only in WHERE clauses, is that crucial information is sometimes hidden from the query optimizer. From a security point of view, bind variables prevent the risks associated with SQL injection.
  • 16. Not Using Advanced Database Features Designing for Performance: Database Related Worst Practices16 9/2/2015 High-end database engines provide many advanced features that can drastically reduce development costs while boosting performance. E.g. data-centric processing should take place as closely as possible to the data Leverage your investment by taking advantage of those features as much as possible. Most of the time, database-independent applications are not required. I would recommend to develop a database-independent application only when there are very good reasons for doing it. Companies are more likely to change the whole application before changing just the database engine.
  • 17. Performing Unnecessary Commits Designing for Performance: Database Related Worst Practices17 9/2/2015 Commits are operations that call for serialization. Every operation that leads to serialization inhibits scalability. Serialization is unwanted and should be minimized as much as possible.
  • 18. Steadily Opening and Closing Database Connections Designing for Performance: Database Related Worst Practices18 9/2/2015 Opening a database connection that in turn starts an associated process or thread on the database server is not a lightweight operation. Do not underestimate the amount of time and resources required. A worst-case scenario that I sometimes observe is a web application that opens and closes a database connection for every request that involves a database access. Using a pool of connections is of paramount importance.
  • 19. Opening Too Many Database Connections Designing for Performance: Database Related Worst Practices19 9/2/2015 A database connection that as an associated process or thread on the database server is not a lightweight resource. A processor core cannot efficiently handle many concurrent processes or threads. Using a pool of connections of limited size is of paramount importance.
  • 20. Designing for Performance: Database Related Worst Practices20 9/2/2015 Core Messages
  • 21. Designing for Performance: Database Related Worst Practices21 9/2/2015 Let’s Face it, Information Technology Is Expensive! Simple solutions for simple problems, elegant solutions for complex problems.
  • 22. One Size Fits All? Designing for Performance: Database Related Worst Practices22 9/2/2015 Use the right tool for the right job.
  • 23. Designing for Performance: Database Related Worst Practices23 9/2/2015 Performance Is Not an Option Optimal performance is not simply a product one can buy but rather the results of an accurate planning and a correct implementation.
  • 24. Questions and Answers Christian Antognini Senior Principal Consultant christian.antognini@trivadis.com 9/2/2015 Designing for Performance: Database Related Worst Practices24