Finding Query Problems Early
Seeing Database Problems Without the Noise
Performance issues have a way of hiding in plain sight.
An application can feel fast during development, only to reveal N+1 queries, unnecessary eager loading, or unexpectedly slow database calls after it grows. Over the years, I've spent plenty of time tracking down these kinds of problems, and while there are excellent tools available, I often found myself wanting something simpler and less intrusive. That desire eventually led to building QueryOwl.
The Problem with Hidden Query Performance Issues
Database inefficiencies are easy to introduce.
A seemingly harmless change can accidentally create:
- N+1 queries
- Slow SQL statements
- Unused eager loads
- Excessive database traffic
The challenge is that these problems often remain invisible until someone notices a page becoming slow.
Developers usually discover them through:
- Production monitoring
- Manual log inspection
- User complaints
- Performance profiling sessions
By then, the issue has already escaped into the real world.
When Performance Tools Become Too Loud
Tools like Bullet have helped Rails developers for years, but in many projects I found myself wanting something with a lighter touch.
I didn't necessarily need browser popups, JavaScript alerts, or extensive configuration.
What I really wanted was:
- Clear warnings.
- Useful context.
- Structured information.
- Minimal distraction.
Something that stayed out of the way until it was needed.
Introducing QueryOwl
QueryOwl is a lightweight Rails tool that watches for common query problems and reports them through your existing logs.
It focuses on three common issues:
- N+1 queries.
- Slow database calls.
- Unused eager loading.
Rather than overwhelming developers with notifications, QueryOwl aims to provide focused feedback with enough information to quickly understand what's happening.
Getting Started
Setup is intentionally simple.
Add the gem:
gem "query_owl"
Run the installer:
rails generate query_owl:install
And QueryOwl immediately begins monitoring requests during development.
No external services.
No dashboards to configure.
No production overhead.
Designed for Development
QueryOwl is meant to help developers catch problems early.
Warnings are emitted directly into the Rails logger with structured information that includes:
- Query details.
- Timing information.
- Request context.
- Relevant backtraces.
This makes it easier to understand not just that a problem exists, but where it originated.
Focused Signal Instead of Constant Noise
One of the goals behind QueryOwl was reducing alert fatigue.
Instead of producing endless notifications, QueryOwl provides concise summaries and surfaces only the issues that deserve attention.
The result is a tool that feels less like a constant interruption and more like a helpful reviewer quietly watching for mistakes.
Built for Modern Rails Applications
In addition to query detection, QueryOwl provides:
- Structured logging.
- Custom notification hooks.
- Development dashboards.
- Test helpers.
- CI integration.
These features make it easy to fit into existing workflows without introducing additional complexity.
Why I Built It
I wanted something that would help answer a simple question:
Is my application doing more work than it needs to?
Without requiring:
- Browser popups.
- Heavy instrumentation.
- Complex setup.
- Additional infrastructure.
I wanted a tool that felt more like a quiet companion than a constant alarm.
QueryOwl is the result.
Because performance problems are difficult enough to solve.
Finding them shouldn't be.