explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JHUD

Settings
# exclusive inclusive rows x rows loops node
1. 42,648.321 62,526.051 ↓ 0.0 0 1

Update on packages p (cost=5,784.42..9,787.40 rows=995,594 width=1,080) (actual time=62,526.051..62,526.051 rows=0 loops=1)

2. 19,616.863 19,877.730 ↓ 24.7 24,616,313 1

Hash Join (cost=5,784.42..9,787.40 rows=995,594 width=1,080) (actual time=206.026..19,877.730 rows=24,616,313 loops=1)

  • Hash Cond: (p1.package_type_id = sv.id)
3. 54.887 54.887 ↑ 1.3 10,701 1

Index Scan using pk_packages on packages p1 (cost=0.29..1,458.81 rows=14,395 width=14) (actual time=0.025..54.887 rows=10,701 loops=1)

  • Index Cond: (cid = 11450)
4. 10.171 205.980 ↓ 5.4 10,219 1

Hash (cost=5,760.34..5,760.34 rows=1,903 width=1,070) (actual time=205.980..205.980 rows=10,219 loops=1)

  • Buckets: 16384 (originally 2048) Batches: 1 (originally 1) Memory Usage: 2463kB
5. 6.127 195.809 ↓ 5.4 10,219 1

Hash Join (cost=4,191.98..5,760.34 rows=1,903 width=1,070) (actual time=171.290..195.809 rows=10,219 loops=1)

  • Hash Cond: (p.package_type_id = sv.id)
6. 18.514 18.514 ↑ 1.2 10,225 1

Index Scan using pk_packages on packages p (cost=0.29..1,458.81 rows=12,108 width=1,050) (actual time=0.013..18.514 rows=10,225 loops=1)

  • Index Cond: (cid = 11450)
  • Filter: (package_type_id IS NOT NULL)
  • Rows Removed by Filter: 476
7. 59.518 171.168 ↓ 5.3 153,535 1

Hash (cost=3,830.76..3,830.76 rows=28,874 width=20) (actual time=171.168..171.168 rows=153,535 loops=1)

  • Buckets: 262144 (originally 32768) Batches: 1 (originally 1) Memory Usage: 10145kB
8. 62.766 111.650 ↓ 5.3 153,535 1

Hash Join (cost=2.45..3,830.76 rows=28,874 width=20) (actual time=0.050..111.650 rows=153,535 loops=1)

  • Hash Cond: ((sv.vendor_name)::text = (dsv.name)::text)
9. 48.860 48.860 ↑ 1.0 153,539 1

Seq Scan on shipping_vendors sv (cost=0.00..3,406.75 rows=154,475 width=17) (actual time=0.011..48.860 rows=153,539 loops=1)

  • Filter: (NOT is_custom)
  • Rows Removed by Filter: 97
10. 0.012 0.024 ↑ 1.0 20 1

Hash (cost=2.20..2.20 rows=20 width=19) (actual time=0.024..0.024 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
11. 0.012 0.012 ↑ 1.0 20 1

Seq Scan on default_shipping_vendors dsv (cost=0.00..2.20 rows=20 width=19) (actual time=0.004..0.012 rows=20 loops=1)

Planning time : 5.075 ms
Execution time : 62,841.151 ms
Trigger times:
Trigger Name:Total time:Calls:Average time:
for constraint fkey_packages_updated_by 312.708 ms 10219 0.031 ms