Request Details

Route
/api_complex GET
Timestamp
Sep 23, 2026 4:22 AM
Duration
134.11 ms
Status
204
Response Size
23 KB
Error
No

Performance Breakdown

Database
68.5% (9 queries)
View Rendering
31.5%
Application Logic
0.0%
Other Operations
0.0%
Total Operations
13
Slowest Operation
38.0 ms

Request Trace

How to read this

Each row is a layer of your stack. Many short Database bars means N+1 queries — fix with includes(). A wide Action bar with little Database time means slow Ruby code. A wide View bar usually means a partial rendered in a loop.

Action
View
Database
Other
View
Database
0.0ms 73.0ms 146.0ms 219.0ms 292.0ms

Operations

How to use this

Sort by Impact to find your biggest wins. Click any row for details and optimisation suggestions. The same SQL appearing multiple times is an N+1 — fix with includes(). A single operation above 50% impact is your highest priority.

Operation Duration Impact Timeline Actions
SELECT * FROM users WHERE id = ? 35 ms 26.1%
INSERT INTO posts (user_id, title, content, published, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?) 22 ms 16.4%
home/index 26 ms 19.4%
SELECT * FROM posts WHERE created_at > ? 15 ms 11.2%
home/index 38 ms 28.3%
SELECT * FROM users LEFT JOIN posts ON users.id = posts.user_id LEFT JOIN comments ON posts.id = comments.post_id LEFT JOIN tags ON posts.id = tags.post_id LEFT JOIN categories ON posts.category_id = categories.id WHERE users.active = ? AND posts.publi... 15 ms 11.2%
DELETE FROM comments WHERE created_at < ? 35 ms 26.1%
SELECT users.* FROM users LEFT JOIN posts ON users.id = posts.user_id LEFT JOIN comments ON posts.id = comments.post_id WHERE users.active = ? AND posts.published = ? AND comments.approved = ? OR users.created_at > ? AND posts.created_at > ? AND commen... 14 ms 10.4%
SELECT users.*, COUNT(DISTINCT posts.id) as post_count, COUNT(DISTINCT comments.id) as comment_count, SUM(posts.view_count) as total_views, AVG(posts.view_count) as avg_views, MIN(posts.created_at) as first_post, MAX(posts.created_at) as latest_post FR... 2 ms 1.5%
home/index 16 ms 11.9%
posts/show 12 ms 8.9%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 32 ms 23.9%
SELECT name FROM users 30 ms 22.4%