Request Details

Route
/api_complex GET
Timestamp
Sep 23, 2026 12:41 AM
Duration
145.4 ms
Status
201
Response Size
39 KB
Error
No

Performance Breakdown

Database
9.5% (8 queries)
View Rendering
8.2%
Application Logic
82.3%
Other Operations
0.0%
Total Operations
25
Slowest Operation
145.4 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 397.7ms 795.3ms 1193.0ms 1590.6ms

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
home#api_complex 145 ms 100.0%
home#api_complex 145 ms 100.0%
DELETE FROM comments WHERE created_at < ? 15 ms 10.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... 26 ms 17.9%
home/index 22 ms 15.1%
SELECT * FROM users WHERE id = ? 32 ms 22.0%
home/index 27 ms 18.6%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 28 ms 19.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... 24 ms 16.5%
home#api_complex 145 ms 100.0%
users/index 8 ms 5.5%
users/index 10 ms 6.9%
home/index 5 ms 3.4%
users/index 35 ms 24.1%
DELETE FROM comments WHERE created_at < ? 4 ms 2.8%
home#api_complex 145 ms 100.0%
home#api_complex 145 ms 100.0%
home#api_complex 145 ms 100.0%
users/index 6 ms 4.1%
layouts/application 18 ms 12.4%
home#api_complex 145 ms 100.0%
home#api_complex 145 ms 100.0%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 3 ms 2.1%
home#api_complex 145 ms 100.0%
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... 19 ms 13.1%