SlideShare a Scribd company logo
Java Enterprise Performance Database Performance
Architectural Considerations
Database Application from 10.000 ft
Database Applicaction X-Rayed
O/R Mapping
Peristence Frameworks Enable easy object-oriented access to relational data faster development of database-centric applications out-of-the-box generic database access logic neglecting the complexity of SQL-based database access Require Deep understanding Thorough tuning Runtime Analysis
Persistence (JPA) Frameworks Work ID oriented Are object based Seperate data loading and construction Require query/loading tuning Provide multi-level caching
Lazy vs. Eager loading Application Database select ... from master select ... from detail select ... from detail select ... from detail Application Database select ... from master,  detail  where ..
Too many SQL calls (N+1 Query) Application Database select ... where id=1 select ... where id=1 select ... where id=100 O/R Mapper Configuration Container managed persistence Bad coding practices
Live Demo
Caching
Generic Caching Architecture Persistence Framework JDBC Layer Database Execution Plan Cache Prepared Statement Cache Cross Session Cache Session Caches Query Cache(s)
Caching Avoid unnecessary database access Consumes system resources Requires good configuration based on usage patterns Checklist Data is only read or also written Data is used at many places in the applications Data changes infrequently Data is only used in current application
Live Demo
The JDBC Layer
Prepared Statements Can speed up SQL execution Execution plan of statement can be cached Actual implementation depends on DB driver always check impact verify your implementation Might consume expensive resources (DB cursors) use with care understand your SQL driver
Connection Pooling Application Database Connection Pools are shared resources Scaling depends on actual load Wrong scaling may lead to volatile  response times
Connection Handling Increased time to connect while DB and app stays stable 1 DB connection 10 DB connections 1 DB connection 200 ms less connection usage
Query more data then needed Application First Name Last Name Country Mike Tom Frank Sinatra Jones Myers Germany firstname lastname birthdate USA Person Address street streetNo city country Austria Database select * from person, address
Release Connections early Application Connection getConnection() closeConnection() Connection locked Application Connection getConnection() closeConnection() Connection locked Code requiring DB access Code NOT requiring DB access
Problem Patterns
Antipattern –  Application vs. Data Design Description Application and Database view of application do not match, resulting in bad performance Resolution Common design session between DBA and application developer
Antipattern – Bulk Operations via Framework Description Running bulk operations via O/R mappers consumes massive memory and results in unnecessary database operations Resolution Direct Maninpulation at SQL level
Antipattern – Wrong Loading Strategy Description Wrong usage of lazy and eager loading results in unnecessary database calls . Resolution Make everything lazy first and define eager fetching based on runtime behaviour
Antipattern – Wrong Caching Strategy Description Although caching is used the application is extremely slow and memory consumption is high. Resolution Verify caching works properly by runtime analysis and tune accordingly
Testing
What to consider during testing Combine read/write queries Vary input parameters Test in realistic concurrency scenarios Test at different load levels
Questions to Answer Prepared Statement Usage Duplicate queries Long lasting queries Queries per use case (transaction) Time to get/use connection Used access patterns
Monitoring & Diagnosis
Statement Statistics are your friend
Monitoring your Connection Pools Used Connections Available/Idle Connections Connection Wait Time Connections created Connections destroyed
Monitoring your Cache Usage Cache Hits/Misses Cache Size In case of problems Actual cache requests Time between requests for same object
alois.reitbauer@dynatrace.com  Mail blog.dynatrace.com  Blog AloisReitbauer   Twitter

More Related Content

Viewers also liked (18)

ogundeji olusola
ogundeji olusolaogundeji olusola
ogundeji olusola
ogundeji sunday
 
Imo
ImoImo
Imo
rodericksilan
 
World Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
World Famous Prayer Interpretation By Dr. Shriniwas KashalikarWorld Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
World Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
sarojs
 
La repubblica ci si nasconde per paura
La repubblica ci si nasconde per pauraLa repubblica ci si nasconde per paura
La repubblica ci si nasconde per paura
ritachiliberti
 
When Everyone Works Together - It Works! 11 Handout
When Everyone Works Together - It Works! 11 HandoutWhen Everyone Works Together - It Works! 11 Handout
When Everyone Works Together - It Works! 11 Handout
Bernie McCann
 
2015 Expo Prospectus
2015 Expo Prospectus2015 Expo Prospectus
2015 Expo Prospectus
Gina Valerio
 
The films of Quentin Tarantino
The films of Quentin TarantinoThe films of Quentin Tarantino
The films of Quentin Tarantino
HG17
 
The mejelle
The mejelleThe mejelle
The mejelle
Muniruddeen Lallmahamood (Dr.)
 
William Kay YIG 2
William Kay YIG 2William Kay YIG 2
William Kay YIG 2
William Kay
 
P1 4 conceptos_sobre_soberan_aa_alimentaria_jlv
P1 4 conceptos_sobre_soberan_aa_alimentaria_jlvP1 4 conceptos_sobre_soberan_aa_alimentaria_jlv
P1 4 conceptos_sobre_soberan_aa_alimentaria_jlv
erickjurado
 
Cumputacion Paquetes Administrativos
Cumputacion Paquetes AdministrativosCumputacion Paquetes Administrativos
Cumputacion Paquetes Administrativos
Yosneidy Pinto
 
Semuel kamangmau msdm viii
Semuel kamangmau msdm viiiSemuel kamangmau msdm viii
Semuel kamangmau msdm viii
Semuel kamangmau
 
Connect Using Social Media
Connect Using Social MediaConnect Using Social Media
Connect Using Social Media
itsmeYO
 
Management Agile par Jérôme Barrand
Management Agile par Jérôme BarrandManagement Agile par Jérôme Barrand
Management Agile par Jérôme Barrand
AFEIT
 
Lk zusammenfassung
Lk zusammenfassungLk zusammenfassung
Lk zusammenfassung
IgorKrestinsky
 
Administracao financeira
Administracao financeiraAdministracao financeira
Administracao financeira
Valéria Braga
 
History of the Wilderness Act
History of the Wilderness ActHistory of the Wilderness Act
History of the Wilderness Act
WILD Foundation
 
World Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
World Famous Prayer Interpretation By Dr. Shriniwas KashalikarWorld Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
World Famous Prayer Interpretation By Dr. Shriniwas Kashalikar
sarojs
 
La repubblica ci si nasconde per paura
La repubblica ci si nasconde per pauraLa repubblica ci si nasconde per paura
La repubblica ci si nasconde per paura
ritachiliberti
 
When Everyone Works Together - It Works! 11 Handout
When Everyone Works Together - It Works! 11 HandoutWhen Everyone Works Together - It Works! 11 Handout
When Everyone Works Together - It Works! 11 Handout
Bernie McCann
 
2015 Expo Prospectus
2015 Expo Prospectus2015 Expo Prospectus
2015 Expo Prospectus
Gina Valerio
 
The films of Quentin Tarantino
The films of Quentin TarantinoThe films of Quentin Tarantino
The films of Quentin Tarantino
HG17
 
William Kay YIG 2
William Kay YIG 2William Kay YIG 2
William Kay YIG 2
William Kay
 
P1 4 conceptos_sobre_soberan_aa_alimentaria_jlv
P1 4 conceptos_sobre_soberan_aa_alimentaria_jlvP1 4 conceptos_sobre_soberan_aa_alimentaria_jlv
P1 4 conceptos_sobre_soberan_aa_alimentaria_jlv
erickjurado
 
Cumputacion Paquetes Administrativos
Cumputacion Paquetes AdministrativosCumputacion Paquetes Administrativos
Cumputacion Paquetes Administrativos
Yosneidy Pinto
 
Semuel kamangmau msdm viii
Semuel kamangmau msdm viiiSemuel kamangmau msdm viii
Semuel kamangmau msdm viii
Semuel kamangmau
 
Connect Using Social Media
Connect Using Social MediaConnect Using Social Media
Connect Using Social Media
itsmeYO
 
Management Agile par Jérôme Barrand
Management Agile par Jérôme BarrandManagement Agile par Jérôme Barrand
Management Agile par Jérôme Barrand
AFEIT
 
Administracao financeira
Administracao financeiraAdministracao financeira
Administracao financeira
Valéria Braga
 
History of the Wilderness Act
History of the Wilderness ActHistory of the Wilderness Act
History of the Wilderness Act
WILD Foundation
 

Similar to W-JAX Performance Workshop - Database Performance (20)

Database and application performance vivek sharma
Database and application performance vivek sharmaDatabase and application performance vivek sharma
Database and application performance vivek sharma
aioughydchapter
 
Optimizing Application Performance - 2022.pptx
Optimizing Application Performance - 2022.pptxOptimizing Application Performance - 2022.pptx
Optimizing Application Performance - 2022.pptx
JasonTuran2
 
High Performance Jdbc
High Performance JdbcHigh Performance Jdbc
High Performance Jdbc
Sam Pattsin
 
High performance database applications with pure query and ibm data studio.ba...
High performance database applications with pure query and ibm data studio.ba...High performance database applications with pure query and ibm data studio.ba...
High performance database applications with pure query and ibm data studio.ba...
Vladimir Bacvanski, PhD
 
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptxODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
Toon Koppelaars
 
SeaJUG May 2012 mybatis
SeaJUG May 2012 mybatisSeaJUG May 2012 mybatis
SeaJUG May 2012 mybatis
Will Iverson
 
2006 DDD4: Data access layers - Convenience vs. Control and Performance?
2006 DDD4: Data access layers - Convenience vs. Control and Performance?2006 DDD4: Data access layers - Convenience vs. Control and Performance?
2006 DDD4: Data access layers - Convenience vs. Control and Performance?
Daniel Fisher
 
Low Hanging Fruits In J EE Performance
Low Hanging Fruits In J EE PerformanceLow Hanging Fruits In J EE Performance
Low Hanging Fruits In J EE Performance
Alois Reitbauer
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”
EPAM Systems
 
Web 2.0 Development with IBM DB2
Web 2.0 Development with IBM DB2Web 2.0 Development with IBM DB2
Web 2.0 Development with IBM DB2
Vladimir Bacvanski, PhD
 
L08 Data Source Layer
L08 Data Source LayerL08 Data Source Layer
L08 Data Source Layer
Ólafur Andri Ragnarsson
 
L17 Data Source Layer
L17 Data Source LayerL17 Data Source Layer
L17 Data Source Layer
Ólafur Andri Ragnarsson
 
Modern Database Development Oow2008 Lucas Jellema
Modern Database Development Oow2008 Lucas JellemaModern Database Development Oow2008 Lucas Jellema
Modern Database Development Oow2008 Lucas Jellema
Lucas Jellema
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
Yogiji Creations
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)
Lucas Jellema
 
OOW09 Ebs Tuning Final
OOW09 Ebs Tuning FinalOOW09 Ebs Tuning Final
OOW09 Ebs Tuning Final
jucaab
 
Ling to SQL and Entity Framework performance analysis
Ling to SQL and Entity Framework performance analysisLing to SQL and Entity Framework performance analysis
Ling to SQL and Entity Framework performance analysis
Alexander Konduforov
 
Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004
Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004
Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004
derek_clark_ashmore
 
Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008
paulguerin
 
Performance By Design
Performance By DesignPerformance By Design
Performance By Design
Guy Harrison
 
Database and application performance vivek sharma
Database and application performance vivek sharmaDatabase and application performance vivek sharma
Database and application performance vivek sharma
aioughydchapter
 
Optimizing Application Performance - 2022.pptx
Optimizing Application Performance - 2022.pptxOptimizing Application Performance - 2022.pptx
Optimizing Application Performance - 2022.pptx
JasonTuran2
 
High Performance Jdbc
High Performance JdbcHigh Performance Jdbc
High Performance Jdbc
Sam Pattsin
 
High performance database applications with pure query and ibm data studio.ba...
High performance database applications with pure query and ibm data studio.ba...High performance database applications with pure query and ibm data studio.ba...
High performance database applications with pure query and ibm data studio.ba...
Vladimir Bacvanski, PhD
 
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptxODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
ODTUG_NoPlsql_vs_SmartDB_Part1_and_2.pptx
Toon Koppelaars
 
SeaJUG May 2012 mybatis
SeaJUG May 2012 mybatisSeaJUG May 2012 mybatis
SeaJUG May 2012 mybatis
Will Iverson
 
2006 DDD4: Data access layers - Convenience vs. Control and Performance?
2006 DDD4: Data access layers - Convenience vs. Control and Performance?2006 DDD4: Data access layers - Convenience vs. Control and Performance?
2006 DDD4: Data access layers - Convenience vs. Control and Performance?
Daniel Fisher
 
Low Hanging Fruits In J EE Performance
Low Hanging Fruits In J EE PerformanceLow Hanging Fruits In J EE Performance
Low Hanging Fruits In J EE Performance
Alois Reitbauer
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”
EPAM Systems
 
Modern Database Development Oow2008 Lucas Jellema
Modern Database Development Oow2008 Lucas JellemaModern Database Development Oow2008 Lucas Jellema
Modern Database Development Oow2008 Lucas Jellema
Lucas Jellema
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
Yogiji Creations
 
Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)Java Developers, make the database work for you (NLJUG JFall 2010)
Java Developers, make the database work for you (NLJUG JFall 2010)
Lucas Jellema
 
OOW09 Ebs Tuning Final
OOW09 Ebs Tuning FinalOOW09 Ebs Tuning Final
OOW09 Ebs Tuning Final
jucaab
 
Ling to SQL and Entity Framework performance analysis
Ling to SQL and Entity Framework performance analysisLing to SQL and Entity Framework performance analysis
Ling to SQL and Entity Framework performance analysis
Alexander Konduforov
 
Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004
Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004
Jdbc Best Practices - DB2/ IDUG - Orlando, May 10, 2004
derek_clark_ashmore
 
Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008Myth busters - performance tuning 102 2008
Myth busters - performance tuning 102 2008
paulguerin
 
Performance By Design
Performance By DesignPerformance By Design
Performance By Design
Guy Harrison
 

More from Alois Reitbauer (20)

Monitoring large scale Docker production environments
Monitoring large scale Docker production environmentsMonitoring large scale Docker production environments
Monitoring large scale Docker production environments
Alois Reitbauer
 
Can a monitoring tool pass the turing test
Can a monitoring tool pass the turing testCan a monitoring tool pass the turing test
Can a monitoring tool pass the turing test
Alois Reitbauer
 
Monitoring Docker Application in Production
Monitoring Docker Application in ProductionMonitoring Docker Application in Production
Monitoring Docker Application in Production
Alois Reitbauer
 
The definition of normal - An introduction and guide to anomaly detection.
The definition of normal - An introduction and guide to anomaly detection. The definition of normal - An introduction and guide to anomaly detection.
The definition of normal - An introduction and guide to anomaly detection.
Alois Reitbauer
 
Monitoring without alerts
Monitoring without alertsMonitoring without alerts
Monitoring without alerts
Alois Reitbauer
 
Ruxit - How we launched a global monitoring platform on AWS in 80 days.
Ruxit - How we launched a global monitoring platform on AWS in 80 days. Ruxit - How we launched a global monitoring platform on AWS in 80 days.
Ruxit - How we launched a global monitoring platform on AWS in 80 days.
Alois Reitbauer
 
Microservice, Micro Deployments and DevOps
Microservice, Micro Deployments and DevOpsMicroservice, Micro Deployments and DevOps
Microservice, Micro Deployments and DevOps
Alois Reitbauer
 
The Dark Art of Production Alerting
The Dark Art of Production AlertingThe Dark Art of Production Alerting
The Dark Art of Production Alerting
Alois Reitbauer
 
W3C Web Performance - A detailed overview
W3C Web Performance - A detailed overviewW3C Web Performance - A detailed overview
W3C Web Performance - A detailed overview
Alois Reitbauer
 
The Dark of Building an Production Incident Syste
The Dark of Building an Production Incident SysteThe Dark of Building an Production Incident Syste
The Dark of Building an Production Incident Syste
Alois Reitbauer
 
The High Performance Web Application Lifecycle
The High Performance Web Application LifecycleThe High Performance Web Application Lifecycle
The High Performance Web Application Lifecycle
Alois Reitbauer
 
Monitoring and Managing Java Applications
Monitoring and Managing Java ApplicationsMonitoring and Managing Java Applications
Monitoring and Managing Java Applications
Alois Reitbauer
 
What it means to be fast in your industry
What it means to be fast in your industryWhat it means to be fast in your industry
What it means to be fast in your industry
Alois Reitbauer
 
Measuring User Experience in the Browser
Measuring User Experience in the BrowserMeasuring User Experience in the Browser
Measuring User Experience in the Browser
Alois Reitbauer
 
Measuring User Experience
Measuring User ExperienceMeasuring User Experience
Measuring User Experience
Alois Reitbauer
 
Web Performance Optimzation
Web Performance OptimzationWeb Performance Optimzation
Web Performance Optimzation
Alois Reitbauer
 
What it means to deliver exceptional performance
What it means to deliver exceptional performanceWhat it means to deliver exceptional performance
What it means to deliver exceptional performance
Alois Reitbauer
 
Why you have less than a second to deliver exceptional performance
Why you have less than a second to deliver exceptional performanceWhy you have less than a second to deliver exceptional performance
Why you have less than a second to deliver exceptional performance
Alois Reitbauer
 
Measuring Performance in the Browser
Measuring Performance in the BrowserMeasuring Performance in the Browser
Measuring Performance in the Browser
Alois Reitbauer
 
Performance Forensics - Understanding Application Performance
Performance Forensics - Understanding Application PerformancePerformance Forensics - Understanding Application Performance
Performance Forensics - Understanding Application Performance
Alois Reitbauer
 
Monitoring large scale Docker production environments
Monitoring large scale Docker production environmentsMonitoring large scale Docker production environments
Monitoring large scale Docker production environments
Alois Reitbauer
 
Can a monitoring tool pass the turing test
Can a monitoring tool pass the turing testCan a monitoring tool pass the turing test
Can a monitoring tool pass the turing test
Alois Reitbauer
 
Monitoring Docker Application in Production
Monitoring Docker Application in ProductionMonitoring Docker Application in Production
Monitoring Docker Application in Production
Alois Reitbauer
 
The definition of normal - An introduction and guide to anomaly detection.
The definition of normal - An introduction and guide to anomaly detection. The definition of normal - An introduction and guide to anomaly detection.
The definition of normal - An introduction and guide to anomaly detection.
Alois Reitbauer
 
Monitoring without alerts
Monitoring without alertsMonitoring without alerts
Monitoring without alerts
Alois Reitbauer
 
Ruxit - How we launched a global monitoring platform on AWS in 80 days.
Ruxit - How we launched a global monitoring platform on AWS in 80 days. Ruxit - How we launched a global monitoring platform on AWS in 80 days.
Ruxit - How we launched a global monitoring platform on AWS in 80 days.
Alois Reitbauer
 
Microservice, Micro Deployments and DevOps
Microservice, Micro Deployments and DevOpsMicroservice, Micro Deployments and DevOps
Microservice, Micro Deployments and DevOps
Alois Reitbauer
 
The Dark Art of Production Alerting
The Dark Art of Production AlertingThe Dark Art of Production Alerting
The Dark Art of Production Alerting
Alois Reitbauer
 
W3C Web Performance - A detailed overview
W3C Web Performance - A detailed overviewW3C Web Performance - A detailed overview
W3C Web Performance - A detailed overview
Alois Reitbauer
 
The Dark of Building an Production Incident Syste
The Dark of Building an Production Incident SysteThe Dark of Building an Production Incident Syste
The Dark of Building an Production Incident Syste
Alois Reitbauer
 
The High Performance Web Application Lifecycle
The High Performance Web Application LifecycleThe High Performance Web Application Lifecycle
The High Performance Web Application Lifecycle
Alois Reitbauer
 
Monitoring and Managing Java Applications
Monitoring and Managing Java ApplicationsMonitoring and Managing Java Applications
Monitoring and Managing Java Applications
Alois Reitbauer
 
What it means to be fast in your industry
What it means to be fast in your industryWhat it means to be fast in your industry
What it means to be fast in your industry
Alois Reitbauer
 
Measuring User Experience in the Browser
Measuring User Experience in the BrowserMeasuring User Experience in the Browser
Measuring User Experience in the Browser
Alois Reitbauer
 
Measuring User Experience
Measuring User ExperienceMeasuring User Experience
Measuring User Experience
Alois Reitbauer
 
Web Performance Optimzation
Web Performance OptimzationWeb Performance Optimzation
Web Performance Optimzation
Alois Reitbauer
 
What it means to deliver exceptional performance
What it means to deliver exceptional performanceWhat it means to deliver exceptional performance
What it means to deliver exceptional performance
Alois Reitbauer
 
Why you have less than a second to deliver exceptional performance
Why you have less than a second to deliver exceptional performanceWhy you have less than a second to deliver exceptional performance
Why you have less than a second to deliver exceptional performance
Alois Reitbauer
 
Measuring Performance in the Browser
Measuring Performance in the BrowserMeasuring Performance in the Browser
Measuring Performance in the Browser
Alois Reitbauer
 
Performance Forensics - Understanding Application Performance
Performance Forensics - Understanding Application PerformancePerformance Forensics - Understanding Application Performance
Performance Forensics - Understanding Application Performance
Alois Reitbauer
 

Recently uploaded (20)

Security Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk CertificateSecurity Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk Certificate
VICTOR MAESTRE RAMIREZ
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AISAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
Peter Spielvogel
 
TrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy ContractingTrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy Contracting
TrustArc
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
Gihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai TechnologyGihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai Technology
zainkhurram1111
 
STKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 versionSTKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 version
Dr. Jimmy Schwarzkopf
 
A Comprehensive Guide on Integrating Monoova Payment Gateway
A Comprehensive Guide on Integrating Monoova Payment GatewayA Comprehensive Guide on Integrating Monoova Payment Gateway
A Comprehensive Guide on Integrating Monoova Payment Gateway
danielle hunter
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
European Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility TestingEuropean Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility Testing
Julia Undeutsch
 
New Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDBNew Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
Contributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptxContributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptx
Patrick Lumumba
 
Introducing Ensemble Cloudlet vRouter
Introducing Ensemble  Cloudlet vRouterIntroducing Ensemble  Cloudlet vRouter
Introducing Ensemble Cloudlet vRouter
Adtran
 
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Aaryan Kansari
 
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPathCommunity
 
cloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mitacloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mita
siyaldhande02
 
Cyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptxCyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptx
Ghimire B.R.
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 
Security Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk CertificateSecurity Operations and the Defense Analyst - Splunk Certificate
Security Operations and the Defense Analyst - Splunk Certificate
VICTOR MAESTRE RAMIREZ
 
Create Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent BuilderCreate Your First AI Agent with UiPath Agent Builder
Create Your First AI Agent with UiPath Agent Builder
DianaGray10
 
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AISAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
SAP Sapphire 2025 ERP1612 Enhancing User Experience with SAP Fiori and AI
Peter Spielvogel
 
TrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy ContractingTrustArc Webinar: Mastering Privacy Contracting
TrustArc Webinar: Mastering Privacy Contracting
TrustArc
 
Droidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing HealthcareDroidal: AI Agents Revolutionizing Healthcare
Droidal: AI Agents Revolutionizing Healthcare
Droidal LLC
 
Gihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai TechnologyGihbli AI and Geo sitution |use/misuse of Ai Technology
Gihbli AI and Geo sitution |use/misuse of Ai Technology
zainkhurram1111
 
STKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 versionSTKI Israel Market Study 2025 final v1 version
STKI Israel Market Study 2025 final v1 version
Dr. Jimmy Schwarzkopf
 
A Comprehensive Guide on Integrating Monoova Payment Gateway
A Comprehensive Guide on Integrating Monoova Payment GatewayA Comprehensive Guide on Integrating Monoova Payment Gateway
A Comprehensive Guide on Integrating Monoova Payment Gateway
danielle hunter
 
Maxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing placeMaxx nft market place new generation nft marketing place
Maxx nft market place new generation nft marketing place
usersalmanrazdelhi
 
European Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility TestingEuropean Accessibility Act & Integrated Accessibility Testing
European Accessibility Act & Integrated Accessibility Testing
Julia Undeutsch
 
New Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDBNew Ways to Reduce Database Costs with ScyllaDB
New Ways to Reduce Database Costs with ScyllaDB
ScyllaDB
 
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk TechniciansOffshore IT Support: Balancing In-House and Offshore Help Desk Technicians
Offshore IT Support: Balancing In-House and Offshore Help Desk Technicians
john823664
 
Contributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptxContributing to WordPress With & Without Code.pptx
Contributing to WordPress With & Without Code.pptx
Patrick Lumumba
 
Introducing Ensemble Cloudlet vRouter
Introducing Ensemble  Cloudlet vRouterIntroducing Ensemble  Cloudlet vRouter
Introducing Ensemble Cloudlet vRouter
Adtran
 
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Agentic AI Explained: The Next Frontier of Autonomous Intelligence & Generati...
Aaryan Kansari
 
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath InsightsUiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPath Community Berlin: Studio Tips & Tricks and UiPath Insights
UiPathCommunity
 
cloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mitacloudgenesis cloud workshop , gdg on campus mita
cloudgenesis cloud workshop , gdg on campus mita
siyaldhande02
 
Cyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptxCyber Security Legal Framework in Nepal.pptx
Cyber Security Legal Framework in Nepal.pptx
Ghimire B.R.
 
Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025Kubernetes Cloud Native Indonesia Meetup - May 2025
Kubernetes Cloud Native Indonesia Meetup - May 2025
Prasta Maha
 
Fully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and ControlFully Open-Source Private Clouds: Freedom, Security, and Control
Fully Open-Source Private Clouds: Freedom, Security, and Control
ShapeBlue
 

W-JAX Performance Workshop - Database Performance

  • 1. Java Enterprise Performance Database Performance
  • 6. Peristence Frameworks Enable easy object-oriented access to relational data faster development of database-centric applications out-of-the-box generic database access logic neglecting the complexity of SQL-based database access Require Deep understanding Thorough tuning Runtime Analysis
  • 7. Persistence (JPA) Frameworks Work ID oriented Are object based Seperate data loading and construction Require query/loading tuning Provide multi-level caching
  • 8. Lazy vs. Eager loading Application Database select ... from master select ... from detail select ... from detail select ... from detail Application Database select ... from master, detail where ..
  • 9. Too many SQL calls (N+1 Query) Application Database select ... where id=1 select ... where id=1 select ... where id=100 O/R Mapper Configuration Container managed persistence Bad coding practices
  • 12. Generic Caching Architecture Persistence Framework JDBC Layer Database Execution Plan Cache Prepared Statement Cache Cross Session Cache Session Caches Query Cache(s)
  • 13. Caching Avoid unnecessary database access Consumes system resources Requires good configuration based on usage patterns Checklist Data is only read or also written Data is used at many places in the applications Data changes infrequently Data is only used in current application
  • 16. Prepared Statements Can speed up SQL execution Execution plan of statement can be cached Actual implementation depends on DB driver always check impact verify your implementation Might consume expensive resources (DB cursors) use with care understand your SQL driver
  • 17. Connection Pooling Application Database Connection Pools are shared resources Scaling depends on actual load Wrong scaling may lead to volatile response times
  • 18. Connection Handling Increased time to connect while DB and app stays stable 1 DB connection 10 DB connections 1 DB connection 200 ms less connection usage
  • 19. Query more data then needed Application First Name Last Name Country Mike Tom Frank Sinatra Jones Myers Germany firstname lastname birthdate USA Person Address street streetNo city country Austria Database select * from person, address
  • 20. Release Connections early Application Connection getConnection() closeConnection() Connection locked Application Connection getConnection() closeConnection() Connection locked Code requiring DB access Code NOT requiring DB access
  • 22. Antipattern – Application vs. Data Design Description Application and Database view of application do not match, resulting in bad performance Resolution Common design session between DBA and application developer
  • 23. Antipattern – Bulk Operations via Framework Description Running bulk operations via O/R mappers consumes massive memory and results in unnecessary database operations Resolution Direct Maninpulation at SQL level
  • 24. Antipattern – Wrong Loading Strategy Description Wrong usage of lazy and eager loading results in unnecessary database calls . Resolution Make everything lazy first and define eager fetching based on runtime behaviour
  • 25. Antipattern – Wrong Caching Strategy Description Although caching is used the application is extremely slow and memory consumption is high. Resolution Verify caching works properly by runtime analysis and tune accordingly
  • 27. What to consider during testing Combine read/write queries Vary input parameters Test in realistic concurrency scenarios Test at different load levels
  • 28. Questions to Answer Prepared Statement Usage Duplicate queries Long lasting queries Queries per use case (transaction) Time to get/use connection Used access patterns
  • 31. Monitoring your Connection Pools Used Connections Available/Idle Connections Connection Wait Time Connections created Connections destroyed
  • 32. Monitoring your Cache Usage Cache Hits/Misses Cache Size In case of problems Actual cache requests Time between requests for same object
  • 33. [email protected] Mail blog.dynatrace.com Blog AloisReitbauer Twitter

Editor's Notes

  • #11: Working with caches
  • #15: Working with caches