SlideShare a Scribd company logo
Debugging Grails Database
     Performance
Tom Dunstan / @tomdcc


                                           tom@energizedwork.com


                                                                      #ggx




LICENSEDUNDERCREATIVECOMMONSBYENERGIZEDWORKLIMITED   |HMSPRESIDENT,VICTORIAEMBANKMENT,LONDON,EC40HJ|WWW.ENERGIZEDWORK.COM   2
✪ GORM

•   One of the best parts of Grails
•   Easy data access
•   No DAOs etc required
•   Can access data from anywhere
✪ GORM

•   Can access data from anywhere
•   This can be dangerous
•   Many data access patterns can coexist
•   Difficult to work out what is generating a
    particular query
✪ GORM

• Getting data out of collections can have
  unintended consequences
✪ WHERE CAN WE ACCESS DATA?

•   Filters
•   URL Mapping Constraints
•   Controllers
•   Services
•   Modules
•   Named Queries
•   Helper classes
•   Views
•   Tag Libraries
✪ WHERE CAN WE ACCESS DATA?

• It may not be apparent exactly when
  data is being fetched
✪ SPAGHETTI

• Long lived projects can evolve
  multiple ways of doing things
DEMO 1
✪ SORTING IT OUT

• Logging SQL doesn’t tie generated SQL to
  specific parts of the codebase
✪ SORTING IT OUT

• Existing profiler plugin can automatically log
  controller, service and view entry / exits
• Not bad, but doesn’t tie SQL queries to those
  places
• Stuff in e.g. taglibs isn’t made explicit
• Stuff in layout vs main view isn’t made explicit
✪ THE TARGET

• MVC Mini Profiler
• Developed for Stack Overflow
• Keeps performance on your mind
✪ THE TARGET
DEMO 2
✪ CURRENT STATUS

•   Version 0.1
•   Just pushed to Github
•   Plugin waiting for approval 
•   Not all features of MVC Mini Profiler
✪ FUTURE

• Implement missing MVC Mini Profiler features
   – SQL Storage
   – Detect Duplicate SQL queries
✪ FUTURE

• Grails profiler plugin needs some work for 2.0+
• Not tested on 2.0+
✪ FUTURE

• Split out separate Java library to share
  functionality with other frameworks
• Show nested GSP names
• Show Tag Library calls
• EXPLAIN functionality built in
   – Debug query performance from within app
   – Supported by PostgreSQL, MySQL, others?
• Support non-SQL data stores
✪ QUESTIONS




        https://github.com/tomdcc/grails-miniprofiler

                                             Tom Dunstan / @tomdcc
                                            tom@energizedwork.com




 LICENSEDUNDERCREATIVECOMMONSBYENERGIZEDWORKLIMITED   |HMSPRESIDENT,VICTORIAEMBANKMENT,LONDON,EC40HJ|WWW.ENERGIZEDWORK.COM   19

More Related Content

What's hot (20)

PDF
Introduction to Micronaut - JBCNConf 2019
graemerocher
 
PDF
Building and Releasing a Golang CLI Tool
Bradley Cypert
 
PPTX
Dnc2015 azure-microservizi-vforusso
DotNetCampus
 
PDF
markedj: The best of markdown processor on JVM
takezoe
 
PDF
Tips For Maintaining OSS Projects
Taro L. Saito
 
PDF
Migrating NYSenate.gov
Pantheon
 
PDF
Blazing fast sites using Blaze, Hybrid CMS NYC
Jesus Manuel Olivas
 
PPTX
Automate your development environment with Jira and Saltstack
NetworkedAssets
 
PDF
Icinga Camp San Diego 2016 - Icinga Director
Icinga
 
PPTX
IcingaCamp Stockholm - Icinga Web2
Icinga
 
PDF
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
Icinga
 
PPTX
Icinga Camp Belgrade - Icinga Web 2
Icinga
 
PDF
How we use Python at Bitbucket
Mark Adams
 
PPTX
How to avoid microservice pitfalls
Particular Software
 
PDF
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
OdessaJS Conf
 
PDF
Introduction to OpenFaas
GDG Cloud Bengaluru
 
PPTX
ONAP on Vagrant for ONAPers
Victor Morales
 
PPTX
Micro-frontends – is it a new normal?
Lohika_Odessa_TechTalks
 
PPTX
Icinga Camp Bangalore - Icinga and Icinga Director
Icinga
 
PPTX
Node.js BFFs: our way to better/micro frontends
Eugene Fidelin
 
Introduction to Micronaut - JBCNConf 2019
graemerocher
 
Building and Releasing a Golang CLI Tool
Bradley Cypert
 
Dnc2015 azure-microservizi-vforusso
DotNetCampus
 
markedj: The best of markdown processor on JVM
takezoe
 
Tips For Maintaining OSS Projects
Taro L. Saito
 
Migrating NYSenate.gov
Pantheon
 
Blazing fast sites using Blaze, Hybrid CMS NYC
Jesus Manuel Olivas
 
Automate your development environment with Jira and Saltstack
NetworkedAssets
 
Icinga Camp San Diego 2016 - Icinga Director
Icinga
 
IcingaCamp Stockholm - Icinga Web2
Icinga
 
Icinga Camp San Francisco 2017 - Icinga Director - Managing your configuration
Icinga
 
Icinga Camp Belgrade - Icinga Web 2
Icinga
 
How we use Python at Bitbucket
Mark Adams
 
How to avoid microservice pitfalls
Particular Software
 
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020
OdessaJS Conf
 
Introduction to OpenFaas
GDG Cloud Bengaluru
 
ONAP on Vagrant for ONAPers
Victor Morales
 
Micro-frontends – is it a new normal?
Lohika_Odessa_TechTalks
 
Icinga Camp Bangalore - Icinga and Icinga Director
Icinga
 
Node.js BFFs: our way to better/micro frontends
Eugene Fidelin
 

Similar to Debugging Grails Database Performance (20)

PPTX
Introduction to Grails 2013
Gavin Hogan
 
PDF
Overview of Grails Object Relational Mapping (GORM)
Chris Richardson
 
PDF
Grails Launchpad - From Ground Zero to Orbit
Zachary Klein
 
PDF
Grails and the World of Tomorrow
Peter Ledbrook
 
PPTX
RavenDB overview
Igor Moochnick
 
PDF
Nitro for your Grails App: How to improve performance!! Greach' 18
Alberto Barón Cuevas
 
PDF
Nitro for your Grails App: how to improve performance. Greach '18
Alberto De Ávila Hernández
 
PDF
Enabling Telco to Build and Run Modern Applications
Tugdual Grall
 
PDF
Grails 101
David Jacobs
 
PPTX
Webinar: Getting Started with MongoDB - Back to Basics
MongoDB
 
PPT
A Morning with MongoDB - Helsinki
MongoDB
 
PDF
Naked Objects and Groovy Grails
David Parsons
 
KEY
mongoDB at Visibiz
Mike Brocious
 
PPTX
Polyglot Persistence
Bryan Reinero
 
PPTX
MongoDB at Agilysys: A Case Study
MongoDB
 
PPT
Welcome and Introduction to A Morning with MongoDB Petah Tikvah
MongoDB
 
ODP
Morningwithmongodbisrael 121217184113-phpapp02
Andrei Colta
 
KEY
Mongo Seattle - The Business of MongoDB
Justin Smestad
 
PPT
Wmware NoSQL
Murat Çakal
 
PPTX
JasperWorld 2012: Reinventing Data Management by Max Schireson
MongoDB
 
Introduction to Grails 2013
Gavin Hogan
 
Overview of Grails Object Relational Mapping (GORM)
Chris Richardson
 
Grails Launchpad - From Ground Zero to Orbit
Zachary Klein
 
Grails and the World of Tomorrow
Peter Ledbrook
 
RavenDB overview
Igor Moochnick
 
Nitro for your Grails App: How to improve performance!! Greach' 18
Alberto Barón Cuevas
 
Nitro for your Grails App: how to improve performance. Greach '18
Alberto De Ávila Hernández
 
Enabling Telco to Build and Run Modern Applications
Tugdual Grall
 
Grails 101
David Jacobs
 
Webinar: Getting Started with MongoDB - Back to Basics
MongoDB
 
A Morning with MongoDB - Helsinki
MongoDB
 
Naked Objects and Groovy Grails
David Parsons
 
mongoDB at Visibiz
Mike Brocious
 
Polyglot Persistence
Bryan Reinero
 
MongoDB at Agilysys: A Case Study
MongoDB
 
Welcome and Introduction to A Morning with MongoDB Petah Tikvah
MongoDB
 
Morningwithmongodbisrael 121217184113-phpapp02
Andrei Colta
 
Mongo Seattle - The Business of MongoDB
Justin Smestad
 
Wmware NoSQL
Murat Çakal
 
JasperWorld 2012: Reinventing Data Management by Max Schireson
MongoDB
 
Ad

More from Energized Work (11)

PDF
Agile Practitioners Feedback to improve teams
Energized Work
 
PDF
Surviving SOA
Energized Work
 
PDF
Experience report on agile tools for management teams
Energized Work
 
PDF
Innovation Governance
Energized Work
 
PDF
Business model innovation by experimentation
Energized Work
 
PDF
Governance - Friend or Foe?
Energized Work
 
PDF
MTBF / MTTR - Energized Work TekTalk, Mar 2012
Energized Work
 
PDF
Energized Work: Software that means business
Energized Work
 
PDF
Product Development in the Land of the Free - Energized Work Presentation
Energized Work
 
PDF
Leaning - Energized Work Presentation
Energized Work
 
PDF
Concept to Cash - Energized Work Presentation
Energized Work
 
Agile Practitioners Feedback to improve teams
Energized Work
 
Surviving SOA
Energized Work
 
Experience report on agile tools for management teams
Energized Work
 
Innovation Governance
Energized Work
 
Business model innovation by experimentation
Energized Work
 
Governance - Friend or Foe?
Energized Work
 
MTBF / MTTR - Energized Work TekTalk, Mar 2012
Energized Work
 
Energized Work: Software that means business
Energized Work
 
Product Development in the Land of the Free - Energized Work Presentation
Energized Work
 
Leaning - Energized Work Presentation
Energized Work
 
Concept to Cash - Energized Work Presentation
Energized Work
 
Ad

Recently uploaded (20)

PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Digital Circuits, important subject in CS
contactparinay1
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 

Debugging Grails Database Performance

  • 2. Tom Dunstan / @tomdcc [email protected] #ggx LICENSEDUNDERCREATIVECOMMONSBYENERGIZEDWORKLIMITED |HMSPRESIDENT,VICTORIAEMBANKMENT,LONDON,EC40HJ|WWW.ENERGIZEDWORK.COM 2
  • 3. ✪ GORM • One of the best parts of Grails • Easy data access • No DAOs etc required • Can access data from anywhere
  • 4. ✪ GORM • Can access data from anywhere • This can be dangerous • Many data access patterns can coexist • Difficult to work out what is generating a particular query
  • 5. ✪ GORM • Getting data out of collections can have unintended consequences
  • 6. ✪ WHERE CAN WE ACCESS DATA? • Filters • URL Mapping Constraints • Controllers • Services • Modules • Named Queries • Helper classes • Views • Tag Libraries
  • 7. ✪ WHERE CAN WE ACCESS DATA? • It may not be apparent exactly when data is being fetched
  • 8. ✪ SPAGHETTI • Long lived projects can evolve multiple ways of doing things
  • 10. ✪ SORTING IT OUT • Logging SQL doesn’t tie generated SQL to specific parts of the codebase
  • 11. ✪ SORTING IT OUT • Existing profiler plugin can automatically log controller, service and view entry / exits • Not bad, but doesn’t tie SQL queries to those places • Stuff in e.g. taglibs isn’t made explicit • Stuff in layout vs main view isn’t made explicit
  • 12. ✪ THE TARGET • MVC Mini Profiler • Developed for Stack Overflow • Keeps performance on your mind
  • 15. ✪ CURRENT STATUS • Version 0.1 • Just pushed to Github • Plugin waiting for approval  • Not all features of MVC Mini Profiler
  • 16. ✪ FUTURE • Implement missing MVC Mini Profiler features – SQL Storage – Detect Duplicate SQL queries
  • 17. ✪ FUTURE • Grails profiler plugin needs some work for 2.0+ • Not tested on 2.0+
  • 18. ✪ FUTURE • Split out separate Java library to share functionality with other frameworks • Show nested GSP names • Show Tag Library calls • EXPLAIN functionality built in – Debug query performance from within app – Supported by PostgreSQL, MySQL, others? • Support non-SQL data stores
  • 19. ✪ QUESTIONS https://github.com/tomdcc/grails-miniprofiler Tom Dunstan / @tomdcc [email protected] LICENSEDUNDERCREATIVECOMMONSBYENERGIZEDWORKLIMITED |HMSPRESIDENT,VICTORIAEMBANKMENT,LONDON,EC40HJ|WWW.ENERGIZEDWORK.COM 19