Request Details

Route
/api_complex GET
Timestamp
Sep 19, 2026 5:05 PM
Duration
251.34 ms
Status
200
Response Size
47 KB
Error
No

Performance Breakdown

Database
8.8% (5 queries)
View Rendering
23.2%
Application Logic
67.9%
Other Operations
0.0%
Total Operations
19
Slowest Operation
251.34 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 277.5ms 555.0ms 832.5ms 1110.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
home/index 13 ms 5.2%
SELECT * FROM posts WHERE title LIKE ? AND content LIKE ? AND LOWER(title) LIKE ? AND UPPER(content) LIKE ? 20 ms 8.0%
users/index 23 ms 9.2%
users/index 30 ms 11.9%
home/index 14 ms 5.6%
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... 29 ms 11.5%
posts/show 24 ms 9.5%
home#api_complex 251 ms 100.0%
home#api_complex 251 ms 100.0%
home/index 11 ms 4.4%
home/index 7 ms 2.8%
home#api_complex 251 ms 100.0%
home/index 34 ms 13.5%
SELECT users.*, posts.*, comments.*, COUNT(DISTINCT posts.id) as post_count, COUNT(DISTINCT comments.id) as comment_count, AVG(posts.view_count) as avg_views, MAX(comments.created_at) as latest_comment FROM users LEFT JOIN posts ON users.id = posts.use... 6 ms 2.4%
SELECT * FROM users WHERE id = ? 23 ms 9.2%
layouts/application 34 ms 13.5%
home/index 37 ms 14.7%
home/index 31 ms 12.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... 20 ms 8.0%