explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EWgg : aux table

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 17.234 ↑ 1.0 11 1

Limit (cost=4,520.16..4,520.19 rows=11 width=128) (actual time=17.227..17.234 rows=11 loops=1)

  • Buffers: shared hit=4240
2. 0.029 17.226 ↑ 25.5 11 1

Sort (cost=4,520.16..4,520.86 rows=280 width=128) (actual time=17.225..17.226 rows=11 loops=1)

  • Sort Key: (max(v.id))
  • Sort Method: top-N heapsort Memory: 33kB
  • Buffers: shared hit=4240
3. 0.274 17.197 ↑ 9.3 30 1

GroupAggregate (cost=4,504.12..4,513.92 rows=280 width=128) (actual time=16.963..17.197 rows=30 loops=1)

  • Group Key: c.id
  • Buffers: shared hit=4240
4. 0.031 16.923 ↑ 9.3 30 1

Sort (cost=4,504.12..4,504.82 rows=280 width=300) (actual time=16.919..16.923 rows=30 loops=1)

  • Sort Key: c.id
  • Sort Method: quicksort Memory: 44kB
  • Buffers: shared hit=4240
5. 0.031 16.892 ↑ 9.3 30 1

Nested Loop (cost=4,269.95..4,492.74 rows=280 width=300) (actual time=16.424..16.892 rows=30 loops=1)

  • Buffers: shared hit=4240
6. 0.036 16.711 ↓ 1.1 30 1

Nested Loop (cost=4,269.53..4,362.63 rows=28 width=61) (actual time=16.406..16.711 rows=30 loops=1)

  • Buffers: shared hit=4120
7. 0.042 16.555 ↑ 1.0 30 1

Nested Loop (cost=4,269.10..4,348.70 rows=30 width=16) (actual time=16.388..16.555 rows=30 loops=1)

  • Buffers: shared hit=4000
8. 0.008 16.363 ↑ 1.0 30 1

Limit (cost=4,268.67..4,268.75 rows=30 width=14) (actual time=16.351..16.363 rows=30 loops=1)

  • Buffers: shared hit=3880
9. 0.843 16.355 ↑ 109.9 30 1

Sort (cost=4,268.67..4,276.91 rows=3,297 width=14) (actual time=16.350..16.355 rows=30 loops=1)

  • Sort Key: v.ctid
  • Sort Method: top-N heapsort Memory: 26kB
  • Buffers: shared hit=3880
10. 6.206 15.512 ↓ 1.2 4,118 1

Bitmap Heap Scan on team_robot_value v (cost=375.91..4,171.30 rows=3,297 width=14) (actual time=10.359..15.512 rows=4,118 loops=1)

  • Recheck Cond: (tsv @@ '''alberto'':*'::tsquery)
  • Filter: (team_id = 43)
  • Rows Removed by Filter: 34
  • Heap Blocks: exact=3556
  • Buffers: shared hit=3880
11. 9.306 9.306 ↓ 1.2 4,309 1

Bitmap Index Scan on team_robot_value_tsv_idx (cost=0.00..375.09 rows=3,519 width=0) (actual time=9.306..9.306 rows=4,309 loops=1)

  • Index Cond: (tsv @@ '''alberto'':*'::tsquery)
  • Buffers: shared hit=324
12. 0.150 0.150 ↑ 1.0 1 30

Index Scan using _tmp_test_unnest_idx on _tmp_test ix (cost=0.43..2.65 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=30)

  • Index Cond: (unnest = v.id)
  • Buffers: shared hit=120
13. 0.120 0.120 ↑ 1.0 1 30

Index Scan using contact_pkey on contact c (cost=0.43..0.46 rows=1 width=53) (actual time=0.004..0.004 rows=1 loops=30)

  • Index Cond: (id = ix.id)
  • Filter: ((is_merged IS NULL) AND (team_id = 43))
  • Buffers: shared hit=120
14. 0.150 0.150 ↑ 10.0 1 30

Index Scan using team_robot_value_pkey on team_robot_value rv (cost=0.43..4.55 rows=10 width=276) (actual time=0.005..0.005 rows=1 loops=30)

  • Index Cond: (id = ANY (c.team_robot_values))
  • Buffers: shared hit=120
Planning time : 1.159 ms
Execution time : 17.376 ms