explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TxDS

Settings
# exclusive inclusive rows x rows loops node
1. 0.040 396.323 ↑ 11.0 1 1

GroupAggregate (cost=57,031.99..57,076.47 rows=11 width=40) (actual time=396.323..396.323 rows=1 loops=1)

  • Group Key: sds.seller_delivery_schedule_id, s.seller_rating, so.seller_outlet_min_order_total
2. 0.042 396.283 ↑ 28.8 88 1

Sort (cost=57,031.99..57,038.33 rows=2,534 width=44) (actual time=396.275..396.283 rows=88 loops=1)

  • Sort Key: s.seller_rating, so.seller_outlet_min_order_total
  • Sort Method: quicksort Memory: 31kB
3. 0.014 396.241 ↑ 28.8 88 1

Nested Loop (cost=20,754.24..56,888.73 rows=2,534 width=44) (actual time=396.218..396.241 rows=88 loops=1)

4. 0.019 0.019 ↑ 1.0 1 1

Index Only Scan using outlets_pkey on outlets o (cost=0.41..8.43 rows=1 width=16) (actual time=0.016..0.019 rows=1 loops=1)

  • Index Cond: (outlet_id = '7755a1fc-9aac-4c8e-bde6-50d7c0ec1bda'::uuid)
  • Heap Fetches: 1
5. 56.167 396.208 ↑ 28.8 88 1

Hash Right Join (cost=20,753.82..56,854.96 rows=2,534 width=60) (actual time=396.200..396.208 rows=88 loops=1)

  • Hash Cond: (ord_s.order_package_id = op.order_package_id)
6. 202.174 202.174 ↑ 1.0 653,495 1

Seq Scan on order_skus ord_s (cost=0.00..33,623.76 rows=653,876 width=28) (actual time=0.011..202.174 rows=653,495 loops=1)

7. 0.021 137.867 ↑ 7.2 88 1

Hash (cost=20,745.95..20,745.95 rows=630 width=64) (actual time=137.867..137.867 rows=88 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
8. 19.057 137.846 ↑ 7.2 88 1

Hash Right Join (cost=10,733.57..20,745.95 rows=630 width=64) (actual time=137.814..137.846 rows=88 loops=1)

  • Hash Cond: ((op.order_id = ord.order_id) AND (op.seller_id = so.seller_id) AND (op.order_package_delivery_date = dsw.delivery_schedule_window_delivery))
9. 53.069 53.069 ↑ 1.0 157,954 1

Seq Scan on order_packages op (cost=0.00..8,187.86 rows=162,178 width=52) (actual time=0.025..53.069 rows=157,954 loops=1)

  • Filter: (order_package_status <> 2)
  • Rows Removed by Filter: 697
10. 0.060 65.720 ↑ 7.2 88 1

Hash (cost=10,722.55..10,722.55 rows=630 width=84) (actual time=65.720..65.720 rows=88 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
11. 0.061 65.660 ↑ 7.2 88 1

Nested Loop (cost=1,124.65..10,722.55 rows=630 width=84) (actual time=30.465..65.660 rows=88 loops=1)

  • Join Filter: (sds.seller_id = s.seller_id)
12. 0.022 50.903 ↓ 12.6 88 1

Nested Loop (cost=1,120.85..7,179.78 rows=7 width=80) (actual time=16.320..50.903 rows=88 loops=1)

13. 0.007 0.038 ↑ 1.0 1 1

Nested Loop (cost=0.41..10.68 rows=1 width=64) (actual time=0.032..0.038 rows=1 loops=1)

  • Join Filter: (so.seller_id = s.seller_id)
  • Rows Removed by Join Filter: 13
14. 0.014 0.014 ↑ 1.0 1 1

Index Scan using outlet_id_selled_id_constraint on seller_outlets so (cost=0.41..8.43 rows=1 width=40) (actual time=0.011..0.014 rows=1 loops=1)

  • Index Cond: (outlet_id = '7755a1fc-9aac-4c8e-bde6-50d7c0ec1bda'::uuid)
15. 0.017 0.017 ↓ 1.3 14 1

Seq Scan on sellers s (cost=0.00..2.11 rows=11 width=24) (actual time=0.013..0.017 rows=14 loops=1)

16. 15.307 50.843 ↓ 12.6 88 1

Hash Right Join (cost=1,120.44..7,169.03 rows=7 width=32) (actual time=16.287..50.843 rows=88 loops=1)

  • Hash Cond: (ord.user_id = tu.user_id)
17. 30.001 30.001 ↓ 1.0 158,511 1

Seq Scan on orders ord (cost=0.00..5,454.38 rows=158,438 width=32) (actual time=0.011..30.001 rows=158,511 loops=1)

18. 0.007 5.535 ↑ 1.0 1 1

Hash (cost=1,120.42..1,120.42 rows=1 width=32) (actual time=5.535..5.535 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
19. 5.528 5.528 ↑ 1.0 1 1

Seq Scan on tajir_users tu (cost=0.00..1,120.42 rows=1 width=32) (actual time=4.790..5.528 rows=1 loops=1)

  • Filter: (outlet_id = '7755a1fc-9aac-4c8e-bde6-50d7c0ec1bda'::uuid)
  • Rows Removed by Filter: 22114
20. 0.019 14.696 ↑ 88.0 1 88

Materialize (cost=3.80..3,533.75 rows=88 width=36) (actual time=0.161..0.167 rows=1 loops=88)

21. 0.052 14.677 ↑ 88.0 1 1

Hash Join (cost=3.80..3,533.31 rows=88 width=36) (actual time=14.137..14.677 rows=1 loops=1)

  • Hash Cond: (dsw.delivery_schedule_id = sds.delivery_schedule_id)
22. 14.587 14.587 ↑ 88.3 119 1

Seq Scan on delivery_schedule_windows dsw (cost=0.00..3,489.24 rows=10,503 width=20) (actual time=0.401..14.587 rows=119 loops=1)

  • Filter: ((delivery_schedule_window_start <= now()) AND (delivery_schedule_window_end > now()))
  • Rows Removed by Filter: 112085
23. 0.003 0.038 ↑ 1.0 1 1

Hash (cost=3.79..3.79 rows=1 width=48) (actual time=0.038..0.038 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
24. 0.035 0.035 ↑ 1.0 1 1

Seq Scan on seller_delivery_schedules sds (cost=0.00..3.79 rows=1 width=48) (actual time=0.009..0.035 rows=1 loops=1)

  • Filter: (seller_delivery_schedule_id = '68464855-1938-4108-bb60-54de69216ab7'::uuid)
  • Rows Removed by Filter: 119