P95 Query Time
35 ms
Compared to previous 7 days
Query Responses
Click marker to copy SHA
| Time Period ▼ | Executions | Avg Duration | Min Duration | Max Duration |
|---|---|---|---|---|
| Sep 23, 2026 | 5 | 17.2 ms | 4.0 ms | 33.0 ms |
| Sep 22, 2026 | 17 | 17.71 ms | 1.0 ms | 33.0 ms |
| Sep 21, 2026 | 12 | 17.25 ms | 1.0 ms | 30.0 ms |
| Sep 20, 2026 | 12 | 22.92 ms | 7.0 ms | 35.0 ms |
| Sep 19, 2026 | 9 | 15.67 ms | 3.0 ms | 31.0 ms |
| Sep 18, 2026 | 14 | 18.57 ms | 3.0 ms | 34.0 ms |
| Sep 17, 2026 | 13 | 12.62 ms | 1.0 ms | 33.0 ms |
| Sep 16, 2026 | 18 | 18.17 ms | 3.0 ms | 34.0 ms |
| Sep 15, 2026 | 15 | 19.33 ms | 1.0 ms | 40.0 ms |
| Sep 14, 2026 | 10 | 17.8 ms | 1.0 ms | 30.0 ms |
Total of 15 record(s).
Page 1 of 2
Normalized Query
SELECT COUNT(*) FROM comments WHERE post_id = ?
Diagnostics
Query Characteristics
- Query Type
- SELECT
- Tables
- 1
- Joins
- 0
- Complexity Score
- 3
- Has LIMIT
- No
- Has ORDER BY
- No
- Has GROUP BY
- No
- Has Subqueries
- No
Optimization Suggestions
-
Add single_column index: add_index :comments, :post_id
— Fast lookups for post_id = value queries
add_index :comments, :post_id
Execution Plan
3 | 0 | 53 | SEARCH comments USING COVERING INDEX index_comments_on_post_id (post_id=?)
Query Locations
No location data available.
Location data is captured when codebase_location is present on operations.
Raw Data
{
"query": {
"id": 73,
"normalized_sql": "SELECT COUNT(*) FROM comments WHERE post_id = ?",
"analyzed_at": "2026-09-23 06:02:25 UTC"
},
"performance": {
"total_executions": 0,
"p95_duration_ms": null,
"avg_duration_ms": null,
"p95_row_count": null,
"avg_row_count": null
},
"characteristics": {
"query_type": "SELECT",
"table_count": 1,
"join_count": 0,
"where_clause_complexity": 1,
"has_subqueries": false,
"has_limit": false,
"has_order_by": false,
"has_group_by": false,
"has_having": false,
"has_distinct": false,
"has_aggregations": true,
"estimated_complexity": 3
},
"call_locations": [],
"n_plus_one": {
"detected": false
},
"index_recommendations": [
"add_index :comments, :post_id"
],
"issues": [],
"explain_plan": "3 | 0 | 53 | SEARCH comments USING COVERING INDEX index_comments_on_post_id (post_id=?)"
}