Operation 222066
SELECT COUNT(*) FROM comments WHERE post_id = ?
- Operation Type
sql
- Duration
- 34.0 ms
- Request Impact
- 101.3% of total request time
- Occurred At
- Sep 23, 2026 1:02 AM
- SQL Analysis
- Normal query (<100 ms)
- Performance Comparison
-
Average: 17.9ms
95th Percentile: 34.0ms
Based on 1000 recent operations - Related Operations
- 1 similar operation in this request
- Optimization Tips
-
Add single_column index: add_index :comments, :post_id - Fast lookups for post_id = value queriesIndex Optimization - Review indexes on the 'comments' table. Consider composite indexes for WHERE clauses.