explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5mqJ

Settings
# exclusive inclusive rows x rows loops node
1. 195,977.485 244,286.288 ↑ 1.0 17,674,446 1

Hash Left Join (cost=1,205,454.34..6,725,820.65 rows=17,674,446 width=236) (actual time=24,611.082..244,286.288 rows=17,674,446 loops=1)

  • Hash Cond: (os.order_id = lh_order_to_deal.order_id)
2. 10,791.894 47,944.201 ↑ 1.0 17,674,446 1

Hash Right Join (cost=1,198,341.03..1,849,171.21 rows=17,674,446 width=23) (actual time=24,222.923..47,944.201 rows=17,674,446 loops=1)

  • Hash Cond: (lh_spot_to_deal.usn = os.spot_id)
3. 12,942.414 12,942.414 ↓ 1.0 5,612,137 1

Seq Scan on lh_spot_to_deal (cost=0.00..302,622.70 rows=5,605,985 width=17) (actual time=5.310..12,942.414 rows=5,612,137 loops=1)

  • Filter: (row_num = 1)
  • Rows Removed by Filter: 1647706
4. 4,492.206 24,209.893 ↑ 1.0 17,674,446 1

Hash (cost=891,108.46..891,108.46 rows=17,674,446 width=10) (actual time=24,209.893..24,209.893 rows=17,674,446 loops=1)

  • Buckets: 131072 Batches: 512 Memory Usage: 2495kB
5. 19,717.687 19,717.687 ↑ 1.0 17,674,446 1

Seq Scan on order_spot os (cost=0.00..891,108.46 rows=17,674,446 width=10) (actual time=6.448..19,717.687 rows=17,674,446 loops=1)

6. 34.229 364.602 ↑ 1.0 158,947 1

Hash (cost=4,349.47..4,349.47 rows=158,947 width=16) (actual time=364.602..364.602 rows=158,947 loops=1)

  • Buckets: 131072 Batches: 4 Memory Usage: 2968kB
7. 330.373 330.373 ↑ 1.0 158,947 1

Seq Scan on lh_order_to_deal (cost=0.00..4,349.47 rows=158,947 width=16) (actual time=10.428..330.373 rows=158,947 loops=1)

Planning time : 104.638 ms
Execution time : 256,124.258 ms