explain.depesz.com

PostgreSQL's explain analyze made readable

Result: v0Tr

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 500.453 ↓ 6.0 6 1

Sort (cost=3,903.19..3,903.19 rows=1 width=135) (actual time=500.452..500.453 rows=6 loops=1)

  • Sort Key: _load.load_date, _load.""time"
  • Sort Method: quicksort Memory: 25kB
2. 5.128 500.434 ↓ 6.0 6 1

Nested Loop Left Join (cost=3,859.39..3,903.18 rows=1 width=135) (actual time=226.450..500.434 rows=6 loops=1)

  • Join Filter: (_load.id = cust_schedule_1.load_id)
  • Rows Removed by Join Filter: 14997
3. 7.339 305.634 ↓ 6.0 6 1

Nested Loop Left Join (cost=1,951.06..1,994.82 rows=1 width=73) (actual time=126.615..305.634 rows=6 loops=1)

  • Join Filter: (_load.id = cust_schedule.load_id)
  • Rows Removed by Join Filter: 20685
4. 0.119 0.119 ↓ 6.0 6 1

Index Scan using uc_id_date on load _load (cost=0.06..43.80 rows=1 width=41) (actual time=0.088..0.119 rows=6 loops=1)

  • Index Cond: ((date >= '2019-03-14'::date) AND (date <= '2019-03-14'::date))
  • Filter: ((ship_cat = 1) OR (ship_cat = 2))
5. 95.502 298.176 ↓ 3,448.0 3,448 6

GroupAggregate (cost=1,951.00..1,951.02 rows=1 width=36) (actual time=14.008..49.696 rows=3,448 loops=6)

  • Group Key: cust_schedule.load_id
6. 88.632 202.674 ↓ 7,486.0 7,486 6

GroupAggregate (cost=1,951.00..1,951.01 rows=1 width=72) (actual time=13.996..33.779 rows=7,486 loops=6)

  • Group Key: cust_schedule.load_id, sk.company
7. 43.559 114.042 ↓ 15,016.0 15,016 6

Sort (cost=1,951.00..1,951.00 rows=1 width=16) (actual time=13.991..19.007 rows=15,016 loops=6)

  • Sort Key: cust_schedule.load_id, sk.company
  • Sort Method: quicksort Memory: 1090kB
8. 16.385 70.483 ↓ 15,053.0 15,053 1

Hash Join (cost=1,924.85..1,951.00 rows=1 width=16) (actual time=44.566..70.483 rows=15,053 loops=1)

  • Hash Cond: (((sk.sch_cust_id)::text = (cust_schedule.sch_cust_id)::text) AND (sk.date = cust_schedule.date) AND (sk.ship_cat = cust_schedule.ship_cat))
9. 22.899 33.074 ↓ 4.8 16,523 1

HashAggregate (cost=956.68..967.03 rows=3,452 width=610) (actual time=23.502..33.074 rows=16,523 loops=1)

  • Group Key: sk.sch_cust_id, sk.date, sk.company, sk.ship_cat
  • Filter: (sum(sk.quantity) IS NOT NULL)
10. 10.175 10.175 ↓ 1.0 22,598 1

Seq Scan on skid sk (cost=0.00..889.82 rows=22,286 width=46) (actual time=0.005..10.175 rows=22,598 loops=1)

  • Filter: (type = 0)
  • Rows Removed by Filter: 12412
11. 10.614 21.024 ↓ 1.0 25,567 1

Hash (cost=853.77..853.77 rows=25,422 width=36) (actual time=21.024..21.024 rows=25,567 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 2025kB
12. 10.410 10.410 ↓ 1.0 25,567 1

Seq Scan on customer_entry cust_schedule (cost=0.00..853.77 rows=25,422 width=36) (actual time=0.006..10.410 rows=25,567 loops=1)

  • Filter: (load_id IS NOT NULL)
  • Rows Removed by Filter: 3186
13. 55.044 189.672 ↓ 2,500.0 2,500 6

GroupAggregate (cost=1,908.34..1,908.35 rows=1 width=36) (actual time=12.819..31.612 rows=2,500 loops=6)

  • Group Key: cust_schedule_1.load_id
14. 43.464 134.628 ↓ 3,763.0 3,763 6

GroupAggregate (cost=1,908.34..1,908.34 rows=1 width=72) (actual time=12.810..22.438 rows=3,763 loops=6)

  • Group Key: cust_schedule_1.load_id, sk_1.company
15. 20.733 91.164 ↓ 7,355.0 7,355 6

Sort (cost=1,908.34..1,908.34 rows=1 width=16) (actual time=12.806..15.194 rows=7,355 loops=6)

  • Sort Key: cust_schedule_1.load_id, sk_1.company
  • Sort Method: quicksort Memory: 539kB
16. 9.434 70.431 ↓ 7,383.0 7,383 1

Hash Join (cost=1,883.69..1,908.33 rows=1 width=16) (actual time=55.782..70.431 rows=7,383 loops=1)

  • Hash Cond: (((sk_1.sch_cust_id)::text = (cust_schedule_1.sch_cust_id)::text) AND (sk_1.date = cust_schedule_1.date) AND (sk_1.ship_cat = cust_schedule_1.ship_cat))
17. 14.588 25.370 ↓ 2.4 7,930 1

HashAggregate (cost=915.52..925.28 rows=3,253 width=610) (actual time=19.995..25.370 rows=7,930 loops=1)

  • Group Key: sk_1.sch_cust_id, sk_1.date, sk_1.company, sk_1.ship_cat
  • Filter: (sum(sk_1.quantity) IS NOT NULL)
18. 10.782 10.782 ↓ 1.0 8,719 1

Seq Scan on skid sk_1 (cost=0.00..889.82 rows=8,567 width=46) (actual time=0.251..10.782 rows=8,719 loops=1)

  • Filter: (type = 1)
  • Rows Removed by Filter: 26291
19. 18.717 35.627 ↓ 1.0 25,567 1

Hash (cost=853.77..853.77 rows=25,422 width=36) (actual time=35.626..35.627 rows=25,567 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 2025kB
20. 16.910 16.910 ↓ 1.0 25,567 1

Seq Scan on customer_entry cust_schedule_1 (cost=0.00..853.77 rows=25,422 width=36) (actual time=0.009..16.910 rows=25,567 loops=1)

  • Filter: (load_id IS NOT NULL)
  • Rows Removed by Filter: 3186
Planning time : 0.925 ms
Execution time : 500.662 ms