Request Details

Route
/api_complex GET
Timestamp
Sep 18, 2026 6:33 AM
Duration
114.05 ms
Status
201
Response Size
45 KB
Error
No

Performance Breakdown

Database
12.6% (7 queries)
View Rendering
13.7%
Application Logic
73.7%
Other Operations
0.0%
Total Operations
23
Slowest Operation
114.05 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.7ms 928.0ms 1237.4ms

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 114 ms 100.0%
home#api_complex 114 ms 100.0%
home#api_complex 114 ms 100.0%
posts/show 40 ms 35.1%
home#api_complex 114 ms 100.0%
home#api_complex 114 ms 100.0%
users/index 18 ms 15.8%
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... 16 ms 14.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 > ? 33 ms 28.9%
layouts/application 10 ms 8.8%
SELECT * FROM posts WHERE created_at > ? 4 ms 3.5%
SELECT * FROM users WHERE id = ? 33 ms 28.9%
layouts/application 12 ms 10.5%
SELECT * FROM posts WHERE title LIKE ? AND content LIKE ? AND LOWER(title) LIKE ? AND UPPER(content) LIKE ? 30 ms 26.3%
home#api_complex 114 ms 100.0%
SELECT * FROM posts WHERE created_at > ? 8 ms 7.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 > ? 32 ms 28.1%
posts/show 26 ms 22.8%
home#api_complex 114 ms 100.0%
layouts/application 28 ms 24.6%
home/index 27 ms 23.7%
home#api_complex 114 ms 100.0%
home/index 8 ms 7.0%