Request Details

Route
/api_complex GET
Timestamp
Nov 09, 2026 10:45 PM
Duration
170.13 ms
Status
204
Response Size
40 KB
Error
No

Performance Breakdown

Database
10.8% (9 queries)
View Rendering
11.6%
Application Logic
77.6%
Other Operations
0.0%
Total Operations
25
Slowest Operation
170.13 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 438.8ms 877.5ms 1316.3ms 1755.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
SELECT id, name FROM users WHERE email = ? 4 ms 2.4%
home#api_complex 170 ms 100.0%
users/index 23 ms 13.5%
layouts/application 27 ms 15.9%
UPDATE posts SET view_count = view_count + ? WHERE published = ? 25 ms 14.7%
home#api_complex 170 ms 100.0%
users/index 24 ms 14.1%
home/index 36 ms 21.2%
SELECT posts.* FROM posts WHERE title LIKE ? OR content LIKE ? 24 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... 16 ms 9.4%
SELECT name FROM users 25 ms 14.7%
layouts/application 7 ms 4.1%
layouts/application 23 ms 13.5%
home#api_complex 170 ms 100.0%
home#api_complex 170 ms 100.0%
posts/show 38 ms 22.3%
INSERT INTO posts (user_id, title, content, published, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?) 19 ms 11.2%
layouts/application 26 ms 15.3%
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 9.4%
home#api_complex 170 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... 33 ms 19.4%
SELECT * FROM users WHERE id = ? 28 ms 16.5%
home#api_complex 170 ms 100.0%
home#api_complex 170 ms 100.0%
home#api_complex 170 ms 100.0%