Request Details

Route
/api_complex GET
Timestamp
Sep 18, 2026 7:29 AM
Duration
116.49 ms
Status
200
Response Size
80 KB
Error
No

Performance Breakdown

Database
17.2% (9 queries)
View Rendering
4.5%
Application Logic
78.4%
Other Operations
0.0%
Total Operations
20
Slowest Operation
116.49 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
Action
View
Database
0.0ms 297.2ms 594.5ms 891.7ms 1188.9ms

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 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... 25 ms 21.5%
home#api_complex 116 ms 100.0%
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... 30 ms 25.8%
home#api_complex 116 ms 100.0%
home#api_complex 116 ms 100.0%
home#api_complex 116 ms 100.0%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 31 ms 26.6%
SELECT * FROM comments WHERE post_id = ? ORDER BY created_at DESC LIMIT ? 6 ms 5.2%
home#api_complex 116 ms 100.0%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 18 ms 15.5%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 27 ms 23.2%
home#api_complex 116 ms 100.0%
DELETE FROM comments WHERE created_at < ? 24 ms 20.6%
posts/show 35 ms 30.0%
home#api_complex 116 ms 100.0%
SELECT * FROM comments WHERE post_id = ? ORDER BY created_at DESC LIMIT ? 26 ms 22.3%
SELECT * FROM posts WHERE created_at > ? 17 ms 14.6%
users/index 11 ms 9.4%
layouts/application 7 ms 6.0%
home#api_complex 116 ms 100.0%