explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7VwK

Settings
# exclusive inclusive rows x rows loops node
1. 1.088 5,530.859 ↓ 18.6 3,710 1

Nested Loop (cost=39,052.71..140,057.36 rows=200 width=96) (actual time=5,351.844..5,530.859 rows=3,710 loops=1)

2. 2,463.170 5,403.631 ↓ 18.6 3,710 1

HashAggregate (cost=38,545.20..38,548.20 rows=200 width=166) (actual time=5,351.772..5,403.631 rows=3,710 loops=1)

  • Group Key: container_tasks_state.tags_id
3. 1,946.449 2,940.461 ↓ 196.4 2,700,955 1

Sort (cost=38,270.22..38,304.60 rows=13,749 width=118) (actual time=2,485.807..2,940.461 rows=2,700,955 loops=1)

  • Sort Key: container_tasks_state."time
  • Sort Method: external merge Disk: 352280kB
4.          

Initplan (for Sort)

5. 0.004 0.020 ↑ 1.0 1 1

Aggregate (cost=8.43..8.44 rows=1 width=32) (actual time=0.020..0.020 rows=1 loops=1)

6. 0.016 0.016 ↑ 1.0 1 1

Index Scan using key_val on tags (cost=0.41..8.43 rows=1 width=4) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: ((key = '__name__'::text) AND (value = 'container_tasks_state'::text))
7. 199.300 993.992 ↓ 196.4 2,700,955 1

Custom Scan (ChunkAppend) on container_tasks_state (cost=1,841.79..37,316.74 rows=13,749 width=118) (actual time=101.503..993.992 rows=2,700,955 loops=1)

  • Chunks excluded during startup: 0
8. 279.356 377.117 ↓ 199.9 1,387,600 1

Bitmap Heap Scan on _hyper_240_240_chunk (cost=1,841.79..17,604.30 rows=6,940 width=118) (actual time=101.503..377.117 rows=1,387,600 loops=1)

  • Recheck Cond: (tags_id @> $0)
  • Filter: ("time" < (now() - '01:00:00'::interval))
  • Heap Blocks: exact=26205
9. 97.761 97.761 ↓ 199.9 1,387,600 1

Bitmap Index Scan on _hyper_240_240_chunk_idx_arr (cost=0.00..1,840.05 rows=6,940 width=0) (actual time=97.761..97.761 rows=1,387,600 loops=1)

  • Index Cond: (tags_id @> $0)
10. 298.276 417.575 ↓ 192.9 1,313,355 1

Bitmap Heap Scan on _hyper_240_1210_chunk (cost=1,043.39..19,712.44 rows=6,809 width=118) (actual time=124.130..417.575 rows=1,313,355 loops=1)

  • Recheck Cond: (tags_id @> $0)
  • Filter: ("time" < (now() - '01:00:00'::interval))
  • Rows Removed by Filter: 332045
  • Heap Blocks: exact=31006
11. 119.299 119.299 ↓ 200.0 1,645,400 1

Bitmap Index Scan on _hyper_240_1210_chunk_idx_arr (cost=0.00..1,041.69 rows=8,225 width=0) (actual time=119.299..119.299 rows=1,645,400 loops=1)

  • Index Cond: (tags_id @> $0)
12. 18.550 126.140 ↑ 1.0 1 3,710

Aggregate (cost=507.51..507.52 rows=1 width=32) (actual time=0.034..0.034 rows=1 loops=3,710)

13. 17.320 107.590 ↑ 5.0 20 3,710

Nested Loop (cost=0.29..507.25 rows=100 width=74) (actual time=0.003..0.029 rows=20 loops=3,710)

14. 14.840 14.840 ↑ 5.0 20 3,710

Function Scan on unnest a (cost=0.00..1.00 rows=100 width=4) (actual time=0.002..0.004 rows=20 loops=3,710)

15. 75.430 75.430 ↑ 1.0 1 75,430

Index Scan using tags_pkey on tags tg (cost=0.29..5.06 rows=1 width=78) (actual time=0.001..0.001 rows=1 loops=75,430)

  • Index Cond: (id = a.elem)
Planning time : 0.487 ms
Execution time : 5,594.283 ms