Request Details

Route
/api_complex GET
Timestamp
Nov 21, 2026 11:45 AM
Duration
159.69 ms
Status
200
Response Size
39 KB
Error
No

Performance Breakdown

Database
11.3% (8 queries)
View Rendering
11.2%
Application Logic
77.4%
Other Operations
0.0%
Total Operations
19
Slowest Operation
159.69 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 309.3ms 618.6ms 927.8ms 1237.1ms

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 160 ms 100.0%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 24 ms 15.0%
UPDATE posts SET title = ?, content = ?, updated_at = ? WHERE id = ? 8 ms 5.0%
home/index 17 ms 10.6%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 12 ms 7.5%
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... 31 ms 19.4%
home#api_complex 160 ms 100.0%
home/index 19 ms 11.9%
home#api_complex 160 ms 100.0%
DELETE FROM comments WHERE created_at < ? 22 ms 13.8%
layouts/application 39 ms 24.4%
SELECT * FROM comments WHERE post_id = ? ORDER BY created_at DESC LIMIT ? 23 ms 14.4%
home#api_complex 160 ms 100.0%
users/index 32 ms 20.0%
users/index 32 ms 20.0%
SELECT DISTINCT users.*, posts.*, comments.* FROM users, posts, comments WHERE users.id = posts.user_id AND posts.id = comments.post_id AND users.created_at > ? AND posts.created_at > ? AND comments.created_at > ? 2 ms 1.3%
home#api_complex 160 ms 100.0%
SELECT DISTINCT users.*, posts.*, comments.* FROM users, posts, comments WHERE users.id = posts.user_id AND posts.id = comments.post_id AND users.created_at > ? AND posts.created_at > ? AND comments.created_at > ? 18 ms 11.3%
home#api_complex 160 ms 100.0%