Request Details

Route
/api_complex GET
Timestamp
Nov 09, 2026 5:37 PM
Duration
159.88 ms
Status
201
Response Size
55 KB
Error
No

Performance Breakdown

Database
16.5% (8 queries)
View Rendering
7.5%
Application Logic
76.0%
Other Operations
0.0%
Total Operations
18
Slowest Operation
159.88 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 262.8ms 525.7ms 788.5ms 1051.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/index 5 ms 3.1%
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... 15 ms 9.4%
posts/show 12 ms 7.5%
SELECT * FROM users WHERE id = ? 26 ms 16.3%
home#api_complex 160 ms 100.0%
posts/show 18 ms 11.3%
home/index 8 ms 5.0%
home#api_complex 160 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... 34 ms 21.3%
home#api_complex 160 ms 100.0%
INSERT INTO posts (user_id, title, content, published, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?) 9 ms 5.6%
home#api_complex 160 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... 30 ms 18.8%
SELECT * FROM posts WHERE created_at > ? 12 ms 7.5%
home#api_complex 160 ms 100.0%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 21 ms 13.1%
users/index 36 ms 22.5%
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... 26 ms 16.3%