explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ysdU

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 70,771.761 ↑ 1.0 200 1

Limit (cost=1,068,603.77..1,068,604.27 rows=200 width=86) (actual time=70,771.728..70,771.761 rows=200 loops=1)

  • Buffers: shared hit=1395520 read=241955 dirtied=6, temp read=4274 written=4274
2. 3.335 70,771.744 ↑ 26.2 200 1

Sort (cost=1,068,603.77..1,068,616.86 rows=5,234 width=86) (actual time=70,771.727..70,771.744 rows=200 loops=1)

  • Sort Key: batchupdat0_.scheduled_timestamp DESC
  • Sort Method: top-N heapsort Memory: 55kB
  • Buffers: shared hit=1395520 read=241955 dirtied=6, temp read=4274 written=4274
3. 160.076 70,768.409 ↓ 1.0 5,277 1

GroupAggregate (cost=1,057,338.45..1,068,377.56 rows=5,234 width=86) (actual time=70,457.539..70,768.409 rows=5,277 loops=1)

  • Group Key: batchupdat0_.id
  • Buffers: shared hit=1395517 read=241955 dirtied=6, temp read=4274 written=4274
4. 82.965 70,608.333 ↑ 1.1 407,073 1

Merge Join (cost=1,057,338.45..1,061,735.75 rows=441,043 width=67) (actual time=70,457.511..70,608.333 rows=407,073 loops=1)

  • Merge Cond: (batchupdat0_.id = batchupdat1_.batch_update_task_id)
  • Buffers: shared hit=1395517 read=241955 dirtied=6, temp read=4274 written=4274
5. 3.572 18.860 ↓ 1.0 5,488 1

Sort (cost=1,121.47..1,134.55 rows=5,234 width=46) (actual time=17.501..18.860 rows=5,488 loops=1)

  • Sort Key: batchupdat0_.id
  • Sort Method: quicksort Memory: 834kB
  • Buffers: shared hit=1 read=771
6. 15.288 15.288 ↓ 1.0 5,488 1

Seq Scan on batch_update_task batchupdat0_ (cost=0.00..798.17 rows=5,234 width=46) (actual time=0.853..15.288 rows=5,488 loops=1)

  • Buffers: shared hit=1 read=771
7. 347.694 70,506.508 ↑ 1.1 407,073 1

Sort (cost=1,056,215.93..1,057,318.54 rows=441,043 width=25) (actual time=70,439.936..70,506.508 rows=407,073 loops=1)

  • Sort Key: batchupdat1_.batch_update_task_id
  • Sort Method: external sort Disk: 17096kB
  • Buffers: shared hit=1395516 read=241184 dirtied=6, temp read=4274 written=4274
8. 406.840 70,158.814 ↑ 1.1 407,073 1

Hash Left Join (cost=9,202.48..1,014,866.91 rows=441,043 width=25) (actual time=183.661..70,158.814 rows=407,073 loops=1)

  • Hash Cond: (batchupdat1_.id = batchupdat2_.batch_update_item_id)
  • Buffers: shared hit=1395516 read=241184 dirtied=6
9. 310.325 69,576.394 ↓ 1.0 407,073 1

Nested Loop (cost=0.44..1,002,109.96 rows=406,276 width=12) (actual time=6.365..69,576.394 rows=407,073 loops=1)

  • Buffers: shared hit=1395514 read=237497 dirtied=6
10. 63.659 63.659 ↓ 1.0 407,073 1

Seq Scan on batch_update_item batchupdat1_ (cost=0.00..4,554.38 rows=406,276 width=12) (actual time=0.008..63.659 rows=407,073 loops=1)

  • Buffers: shared hit=2523
11. 69,202.410 69,202.410 ↑ 1.0 1 407,073

Index Only Scan using pk_booking_id on booking booking3_ (cost=0.44..2.45 rows=1 width=4) (actual time=0.170..0.170 rows=1 loops=407,073)

  • Index Cond: (id = batchupdat1_.booking_id)
  • Heap Fetches: 407087
  • Buffers: shared hit=1392991 read=237497 dirtied=6
12. 91.740 175.580 ↑ 1.1 405,728 1

Hash (cost=5,894.22..5,894.22 rows=441,043 width=17) (actual time=175.580..175.580 rows=405,728 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 24700kB
  • Buffers: shared hit=2 read=3687
13. 83.840 83.840 ↑ 1.1 405,728 1

Seq Scan on batch_update_item_result batchupdat2_ (cost=0.00..5,894.22 rows=441,043 width=17) (actual time=0.011..83.840 rows=405,728 loops=1)

  • Buffers: shared hit=2 read=3687
Planning time : 19.482 ms
Execution time : 70,778.048 ms