explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZXex

Settings
# exclusive inclusive rows x rows loops node
1. 12.417 36.314 ↓ 100.8 9,977 1

GroupAggregate (cost=1,104.31..1,107.54 rows=99 width=62) (actual time=23.058..36.314 rows=9,977 loops=1)

  • Group Key: (date_trunc('minute'::text, m1.inserted_at)), m1.body
2. 12.876 23.897 ↓ 100.0 10,000 1

Sort (cost=1,104.31..1,104.56 rows=100 width=30) (actual time=23.036..23.897 rows=10,000 loops=1)

  • Sort Key: (date_trunc('minute'::text, m1.inserted_at)) DESC, m1.body
  • Sort Method: quicksort Memory: 1166kB
3. 2.030 11.021 ↓ 100.0 10,000 1

Subquery Scan on m1 (cost=0.43..1,100.99 rows=100 width=30) (actual time=0.094..11.021 rows=10,000 loops=1)

  • Filter: ((m1.typeof = 'number'::text) OR (m1.typeof = 'string'::text))
4. 0.734 8.991 ↑ 1.0 10,000 1

Limit (cost=0.43..950.74 rows=10,000 width=70) (actual time=0.091..8.991 rows=10,000 loops=1)

5. 8.257 8.257 ↑ 86.8 10,000 1

Index Scan Backward using messages_pkey on messages (cost=0.43..82,486.68 rows=867,989 width=70) (actual time=0.090..8.257 rows=10,000 loops=1)

  • Filter: ((("user")::text = 'bashboard'::text) AND ((dash)::text = 'system'::text) AND ((widget)::text = 'Uptime-(hours)'::text))
  • Rows Removed by Filter: 9999
Planning time : 0.202 ms
Execution time : 36.793 ms