explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jlgK

Settings
# exclusive inclusive rows x rows loops node
1. 0.289 1,702.156 ↓ 14.8 2,965 1

Nested Loop (cost=11,434.89..117,232.20 rows=200 width=96) (actual time=1,343.012..1,702.156 rows=2,965 loops=1)

2. 198.329 1,595.127 ↓ 14.8 2,965 1

GroupAggregate (cost=10,903.39..10,923.06 rows=200 width=168) (actual time=1,342.926..1,595.127 rows=2,965 loops=1)

  • Group Key: container_tasks_state.tags_id
3.          

Initplan (for GroupAggregate)

4. 0.004 0.018 ↑ 1.0 1 1

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

5. 0.014 0.014 ↑ 1.0 1 1

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

  • Index Cond: ((key = '__name__'::text) AND (value = 'container_tasks_state'::text))
6. 1,058.372 1,396.780 ↓ 203.4 339,015 1

Sort (cost=10,894.94..10,899.11 rows=1,667 width=120) (actual time=1,342.808..1,396.780 rows=339,015 loops=1)

  • Sort Key: container_tasks_state.tags_id
  • Sort Method: quicksort Memory: 95060kB
7. 138.465 338.408 ↓ 203.4 339,015 1

Sort (cost=10,784.90..10,789.06 rows=1,667 width=120) (actual time=304.301..338.408 rows=339,015 loops=1)

  • Sort Key: container_tasks_state."time
  • Sort Method: quicksort Memory: 95060kB
8. 24.759 199.943 ↓ 203.4 339,015 1

Custom Scan (ChunkAppend) on container_tasks_state (cost=0.43..10,695.69 rows=1,667 width=120) (actual time=109.495..199.943 rows=339,015 loops=1)

  • Chunks excluded during startup: 2
9. 119.018 175.184 ↓ 203.6 339,015 1

Bitmap Heap Scan on _hyper_240_2011_chunk (cost=1,789.55..10,686.78 rows=1,665 width=120) (actual time=109.494..175.184 rows=339,015 loops=1)

  • Recheck Cond: (tags_id @> $0)
  • Filter: ("time" > (now() - '01:00:00'::interval))
  • Rows Removed by Filter: 437950
  • Heap Blocks: exact=15010
10. 56.166 56.166 ↓ 200.0 776,965 1

Bitmap Index Scan on _hyper_240_2011_chunk_idx_arr (cost=0.00..1,789.14 rows=3,885 width=0) (actual time=56.166..56.166 rows=776,965 loops=1)

  • Index Cond: (tags_id @> $0)
11. 17.790 106.740 ↑ 1.0 1 2,965

Aggregate (cost=531.51..531.52 rows=1 width=32) (actual time=0.036..0.036 rows=1 loops=2,965)

12. 15.310 88.950 ↑ 4.8 21 2,965

Nested Loop (cost=0.29..531.25 rows=100 width=79) (actual time=0.004..0.030 rows=21 loops=2,965)

13. 11.860 11.860 ↑ 4.8 21 2,965

Function Scan on unnest a (cost=0.00..1.00 rows=100 width=4) (actual time=0.002..0.004 rows=21 loops=2,965)

14. 61.780 61.780 ↑ 1.0 1 61,780

Index Scan using tags_pkey on tags tg (cost=0.29..5.30 rows=1 width=83) (actual time=0.001..0.001 rows=1 loops=61,780)

  • Index Cond: (id = a.elem)