explain.depesz.com

PostgreSQL's explain analyze made readable

Result: X91c

Settings
# exclusive inclusive rows x rows loops node
1. 3.010 4,813.137 ↓ 28.1 5,630 1

Nested Loop (cost=48,544.29..153,528.93 rows=200 width=96) (actual time=4,531.824..4,813.137 rows=5,630 loops=1)

2. 3,262.833 4,607.447 ↓ 28.1 5,630 1

HashAggregate (cost=48,016.78..48,019.78 rows=200 width=166) (actual time=4,531.755..4,607.447 rows=5,630 loops=1)

  • Group Key: container_tasks_state.tags_id
3.          

Initplan (for HashAggregate)

4. 0.004 0.020 ↑ 1.0 1 1

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

5. 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))
6. 299.401 1,344.594 ↓ 199.7 3,742,370 1

Custom Scan (ChunkAppend) on container_tasks_state (cost=1,841.77..47,867.77 rows=18,742 width=118) (actual time=120.082..1,344.594 rows=3,742,370 loops=1)

  • Chunks excluded during startup: 0
7. 273.978 390.309 ↓ 200.0 1,387,600 1

Bitmap Heap Scan on _hyper_240_240_chunk (cost=1,841.77..17,600.59 rows=6,938 width=118) (actual time=120.081..390.309 rows=1,387,600 loops=1)

  • Recheck Cond: (tags_id @> $0)
  • Filter: ("time" < (now() - '00:05:00'::interval))
  • Heap Blocks: exact=26205
8. 116.331 116.331 ↓ 200.0 1,387,600 1

Bitmap Index Scan on _hyper_240_240_chunk_idx_arr (cost=0.00..1,840.04 rows=6,938 width=0) (actual time=116.331..116.331 rows=1,387,600 loops=1)

  • Index Cond: (tags_id @> $0)
9. 356.339 480.844 ↓ 200.0 1,753,760 1

Bitmap Heap Scan on _hyper_240_1210_chunk (cost=1,731.96..21,630.33 rows=8,769 width=118) (actual time=129.768..480.844 rows=1,753,760 loops=1)

  • Recheck Cond: (tags_id @> $0)
  • Filter: ("time" < (now() - '00:05:00'::interval))
  • Heap Blocks: exact=33028
10. 124.505 124.505 ↓ 200.0 1,753,760 1

Bitmap Index Scan on _hyper_240_1210_chunk_idx_arr (cost=0.00..1,729.77 rows=8,769 width=0) (actual time=124.505..124.505 rows=1,753,760 loops=1)

  • Index Cond: (tags_id @> $0)
11. 127.702 174.040 ↓ 198.0 601,010 1

Bitmap Heap Scan on _hyper_240_2011_chunk (cost=1,436.33..8,636.85 rows=3,035 width=120) (actual time=47.931..174.040 rows=601,010 loops=1)

  • Recheck Cond: (tags_id @> $0)
  • Filter: ("time" < (now() - '00:05:00'::interval))
  • Rows Removed by Filter: 27325
  • Heap Blocks: exact=12159
12. 46.338 46.338 ↓ 200.2 628,880 1

Bitmap Index Scan on _hyper_240_2011_chunk_idx_arr (cost=0.00..1,435.57 rows=3,142 width=0) (actual time=46.338..46.338 rows=628,880 loops=1)

  • Index Cond: (tags_id @> $0)
13. 33.780 202.680 ↑ 1.0 1 5,630

Aggregate (cost=527.51..527.52 rows=1 width=32) (actual time=0.036..0.036 rows=1 loops=5,630)

14. 36.670 168.900 ↑ 5.0 20 5,630

Nested Loop (cost=0.29..527.25 rows=100 width=79) (actual time=0.003..0.030 rows=20 loops=5,630)

15. 16.890 16.890 ↑ 5.0 20 5,630

Function Scan on unnest a (cost=0.00..1.00 rows=100 width=4) (actual time=0.002..0.003 rows=20 loops=5,630)

16. 115.340 115.340 ↑ 1.0 1 115,340

Index Scan using tags_pkey on tags tg (cost=0.29..5.26 rows=1 width=83) (actual time=0.001..0.001 rows=1 loops=115,340)

  • Index Cond: (id = a.elem)
Planning time : 0.688 ms
Execution time : 4,818.461 ms