Request Details

Route
/api_complex GET
Timestamp
Sep 17, 2026 5:00 AM
Duration
137.96 ms
Status
204
Response Size
48 KB
Error
No

Performance Breakdown

Database
9.8% (7 queries)
View Rendering
12.0%
Application Logic
78.2%
Other Operations
0.0%
Total Operations
23
Slowest Operation
137.96 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 352.9ms 705.8ms 1058.8ms 1411.7ms

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 31 ms 22.5%
SELECT * FROM posts WHERE created_at > ? 4 ms 2.9%
posts/show 16 ms 11.6%
users/index 12 ms 8.7%
home#api_complex 138 ms 100.0%
home#api_complex 138 ms 100.0%
home#api_complex 138 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... 8 ms 5.8%
home/index 24 ms 17.4%
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... 25 ms 18.1%
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 > ? 31 ms 22.5%
home#api_complex 138 ms 100.0%
SELECT * FROM posts WHERE title LIKE ? AND content LIKE ? AND LOWER(title) LIKE ? AND UPPER(content) LIKE ? 30 ms 21.7%
home#api_complex 138 ms 100.0%
layouts/application 11 ms 8.0%
users/index 40 ms 29.0%
users/index 18 ms 13.0%
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... 32 ms 23.2%
layouts/application 18 ms 13.0%
home#api_complex 138 ms 100.0%
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... 8 ms 5.8%
home#api_complex 138 ms 100.0%
home#api_complex 138 ms 100.0%