explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LD0C

Settings
# exclusive inclusive rows x rows loops node
1. 0.134 107.138 ↓ 1.3 4 1

HashAggregate (cost=5,228.11..5,228.15 rows=3 width=80) (actual time=107.134..107.138 rows=4 loops=1)

  • Group Key: order_lines.id, zalo_food_dishes.store_item_id
2. 0.017 107.004 ↓ 3.3 10 1

Nested Loop Left Join (cost=2,620.69..5,228.08 rows=3 width=80) (actual time=106.882..107.004 rows=10 loops=1)

3. 0.034 106.947 ↓ 3.3 10 1

Nested Loop (cost=2,620.27..5,225.35 rows=3 width=70) (actual time=106.863..106.947 rows=10 loops=1)

  • Join Filter: (order_lines.dish_id = dishes.id)
4. 21.369 106.843 ↓ 3.3 10 1

Hash Right Join (cost=2,619.85..5,213.71 rows=3 width=48) (actual time=106.822..106.843 rows=10 loops=1)

  • Hash Cond: (order_line_custom_options.order_line_custom_id = order_line_customs.id)
5. 32.038 32.038 ↑ 1.0 109,435 1

Seq Scan on order_line_custom_options (cost=0.00..2,173.33 rows=112,133 width=8) (actual time=0.012..32.038 rows=109,435 loops=1)

6. 0.011 53.436 ↓ 2.7 8 1

Hash (cost=2,619.81..2,619.81 rows=3 width=48) (actual time=53.436..53.436 rows=8 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 1kB
7. 20.537 53.425 ↓ 2.7 8 1

Hash Right Join (cost=170.11..2,619.81 rows=3 width=48) (actual time=53.412..53.425 rows=8 loops=1)

  • Hash Cond: (order_line_customs.order_line_id = order_lines.id)
8. 29.553 29.553 ↑ 1.0 103,184 1

Seq Scan on order_line_customs (cost=0.00..2,058.67 rows=104,267 width=8) (actual time=0.008..29.553 rows=103,184 loops=1)

9. 0.007 3.335 ↓ 2.0 4 1

Hash (cost=170.08..170.08 rows=2 width=44) (actual time=3.335..3.335 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 1kB
10. 1.620 3.328 ↓ 2.0 4 1

Hash Join (cost=8.38..170.08 rows=2 width=44) (actual time=3.307..3.328 rows=4 loops=1)

  • Hash Cond: (zalo_food_dishes.dish_id = order_lines.dish_id)
11. 1.644 1.644 ↓ 1.0 5,640 1

Seq Scan on zalo_food_dishes (cost=0.00..133.79 rows=5,579 width=36) (actual time=0.016..1.644 rows=5,640 loops=1)

12. 0.007 0.064 ↓ 2.0 4 1

Hash (cost=8.35..8.35 rows=2 width=8) (actual time=0.064..0.064 rows=4 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 1kB
13. 0.057 0.057 ↓ 2.0 4 1

Index Scan using order_lines_order_id_idx on order_lines (cost=0.29..8.35 rows=2 width=8) (actual time=0.017..0.057 rows=4 loops=1)

  • Index Cond: (order_id = 39,603)
14. 0.070 0.070 ↑ 1.0 1 10

Index Scan using dishes_pkey on dishes (cost=0.42..3.87 rows=1 width=34) (actual time=0.007..0.007 rows=1 loops=10)

  • Index Cond: (id = zalo_food_dishes.dish_id)
15. 0.040 0.040 ↑ 1.0 1 10

Index Scan using custom_options_pkey on custom_options (cost=0.42..0.90 rows=1 width=18) (actual time=0.004..0.004 rows=1 loops=10)

  • Index Cond: (order_line_custom_options.custom_option_id = id)