Request Details

Route
/api_complex GET
Timestamp
Nov 21, 2026 12:56 AM
Duration
195.55 ms
Status
204
Response Size
33 KB
Error
No

Performance Breakdown

Database
5.6% (8 queries)
View Rendering
9.2%
Application Logic
85.3%
Other Operations
0.0%
Total Operations
25
Slowest Operation
195.55 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 516.0ms 1032.0ms 1548.0ms 2064.0ms

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 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... 26 ms 13.3%
SELECT * FROM posts WHERE title LIKE ? AND content LIKE ? AND LOWER(title) LIKE ? AND UPPER(content) LIKE ? 14 ms 7.2%
home#api_complex 196 ms 100.0%
users/index 30 ms 15.3%
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 > ? 13 ms 6.6%
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... 15 ms 7.7%
layouts/application 18 ms 9.2%
home#api_complex 196 ms 100.0%
home#api_complex 196 ms 100.0%
SELECT * FROM comments WHERE post_id = ? ORDER BY created_at DESC LIMIT ? 3 ms 1.5%
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 > ? 15 ms 7.7%
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 > ? 19 ms 9.7%
posts/show 32 ms 16.4%
SELECT * FROM posts WHERE created_at > ? 10 ms 5.1%
posts/show 27 ms 13.8%
home#api_complex 196 ms 100.0%
home#api_complex 196 ms 100.0%
posts/show 15 ms 7.7%
users/index 12 ms 6.1%
posts/show 17 ms 8.7%
home#api_complex 196 ms 100.0%
posts/show 38 ms 19.4%
home#api_complex 196 ms 100.0%
home#api_complex 196 ms 100.0%
home#api_complex 196 ms 100.0%