explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BBT

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 5,333.155 ↓ 0.0 0 1

Update on iboe_grosses (cost=7,502.49..7,510.44 rows=1 width=220) (actual time=5,333.155..5,333.155 rows=0 loops=1)

2. 0.001 5,333.154 ↓ 0.0 0 1

Nested Loop (cost=7,502.49..7,510.44 rows=1 width=220) (actual time=5,333.154..5,333.154 rows=0 loops=1)

3. 0.001 5,333.153 ↓ 0.0 0 1

HashAggregate (cost=7,502.06..7,502.07 rows=1 width=104) (actual time=5,333.153..5,333.153 rows=0 loops=1)

  • Group Key: ig.id
4. 0.229 5,333.152 ↓ 0.0 0 1

Nested Loop Left Join (cost=4,982.13..7,502.05 rows=1 width=104) (actual time=5,333.152..5,333.152 rows=0 loops=1)

  • Filter: (sig.id IS NULL)
  • Rows Removed by Filter: 637
5. 3.467 5,331.649 ↓ 29.0 637 1

Hash Semi Join (cost=4,981.85..7,494.75 rows=22 width=118) (actual time=4,934.313..5,331.649 rows=637 loops=1)

  • Hash Cond: (ig.theater_id = "*VALUES*".column1)
6. 4.536 5,328.109 ↓ 31.3 35,707 1

Nested Loop (cost=4,978.80..7,488.46 rows=1,139 width=90) (actual time=4,922.595..5,328.109 rows=35,707 loops=1)

7. 0.005 0.012 ↑ 1.0 1 1

HashAggregate (cost=0.02..0.03 rows=1 width=88) (actual time=0.011..0.012 rows=1 loops=1)

  • Group Key: "ANY_subquery".column1
8. 0.007 0.007 ↑ 1.0 1 1

Subquery Scan on ANY_subquery (cost=0.00..0.02 rows=1 width=88) (actual time=0.007..0.007 rows=1 loops=1)

9. 0.000 0.000 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=1)

10. 402.455 5,323.561 ↓ 3,246.1 35,707 1

Bitmap Heap Scan on iboe_grosses ig (cost=4,978.78..7,488.32 rows=11 width=66) (actual time=4,922.579..5,323.561 rows=35,707 loops=1)

  • Recheck Cond: ((country_id = 'US'::text) AND (distributor_id = "ANY_subquery".column1))
  • Rows Removed by Index Recheck: 40599
  • Filter: ((booking_date >= '2019-04-12'::date) AND (booking_date <= '2019-04-18'::date))
  • Rows Removed by Filter: 2288834
  • Heap Blocks: exact=2773 lossy=29336
11. 9.457 4,921.106 ↓ 0.0 0 1

BitmapAnd (cost=4,978.78..4,978.78 rows=648 width=0) (actual time=4,921.106..4,921.106 rows=0 loops=1)

12. 4,099.187 4,099.187 ↓ 181.8 23,568,154 1

Bitmap Index Scan on ix_iboe_grosses_country_id (cost=0.00..2,408.92 rows=129,664 width=0) (actual time=4,099.187..4,099.187 rows=23,568,154 loops=1)

  • Index Cond: (country_id = 'US'::text)
13. 812.462 812.462 ↓ 24.4 3,165,675 1

Bitmap Index Scan on ix_iboe_grosses_distributor_id (cost=0.00..2,569.04 rows=129,664 width=0) (actual time=812.462..812.462 rows=3,165,675 loops=1)

  • Index Cond: (distributor_id = "ANY_subquery".column1)
14. 0.021 0.073 ↑ 1.0 122 1

Hash (cost=1.53..1.53 rows=122 width=32) (actual time=0.073..0.073 rows=122 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
15. 0.052 0.052 ↑ 1.0 122 1

Values Scan on "*VALUES*" (cost=0.00..1.53 rows=122 width=32) (actual time=0.026..0.052 rows=122 loops=1)

16. 1.274 1.274 ↑ 1.0 1 637

Index Scan using ix_temp_staged_iboe_grosses on staged_iboe_grosses sig (cost=0.28..0.32 rows=1 width=34) (actual time=0.002..0.002 rows=1 loops=637)

  • Index Cond: ((theater_id = ig.theater_id) AND (title_id = ig.title_id) AND (booking_date = ig.booking_date))
17. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_iboe_grosses on iboe_grosses (cost=0.44..8.38 rows=1 width=98) (never executed)

  • Index Cond: (id = ig.id)
Planning time : 0.943 ms
Execution time : 5,334.460 ms