Request Details

Route
/api_complex GET
Timestamp
Sep 14, 2026 4:35 PM
Duration
133.65 ms
Status
201
Response Size
14 KB
Error
No

Performance Breakdown

Database
17.1% (7 queries)
View Rendering
15.9%
Application Logic
67.1%
Other Operations
0.0%
Total Operations
14
Slowest Operation
133.65 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 149.5ms 299.0ms 448.5ms 597.9ms

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 * FROM comments WHERE post_id = ? ORDER BY created_at DESC LIMIT ? 18 ms 13.5%
home#api_complex 134 ms 100.0%
home#api_complex 134 ms 100.0%
UPDATE posts SET view_count = view_count + ? WHERE published = ? 7 ms 5.2%
SELECT * FROM users WHERE id = ? 3 ms 2.2%
home#api_complex 134 ms 100.0%
posts/show 21 ms 15.7%
users/index 6 ms 4.5%
users/index 34 ms 25.4%
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 > ? 11 ms 8.2%
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... 19 ms 14.2%
SELECT * FROM posts WHERE user_id = ? ORDER BY created_at DESC LIMIT ? 19 ms 14.2%
posts/show 34 ms 25.4%
SELECT * FROM posts WHERE title LIKE ? AND content LIKE ? AND LOWER(title) LIKE ? AND UPPER(content) LIKE ? 25 ms 18.7%