Request Details

Route
/api_complex GET
Timestamp
Nov 18, 2026 2:33 PM
Duration
141.57 ms
Status
204
Response Size
44 KB
Error
No

Performance Breakdown

Database
6.6% (5 queries)
View Rendering
7.3%
Application Logic
86.1%
Other Operations
0.0%
Total Operations
22
Slowest Operation
141.57 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 452.1ms 904.2ms 1356.2ms 1808.3ms

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
posts/show 21 ms 14.8%
users/index 22 ms 15.5%
DELETE FROM comments WHERE created_at < ? 32 ms 22.6%
home#api_complex 142 ms 100.0%
home/index 20 ms 14.1%
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... 25 ms 17.7%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 11 ms 7.8%
home#api_complex 142 ms 100.0%
home#api_complex 142 ms 100.0%
posts/show 26 ms 18.4%
users/index 6 ms 4.2%
home#api_complex 142 ms 100.0%
home#api_complex 142 ms 100.0%
home#api_complex 142 ms 100.0%
SELECT * FROM users WHERE id = ? 29 ms 20.5%
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 > ? 22 ms 15.5%
home#api_complex 142 ms 100.0%
home#api_complex 142 ms 100.0%
home#api_complex 142 ms 100.0%
home#api_complex 142 ms 100.0%
home#api_complex 142 ms 100.0%
posts/show 37 ms 26.1%