explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 5XSF

Settings
# exclusive inclusive rows x rows loops node
1. 0.203 1,983,173.950 ↑ 1.0 2,000 1

Limit (cost=5,468,666.72..5,497,262.22 rows=2,000 width=8) (actual time=1,983,168.034..1,983,173.950 rows=2,000 loops=1)

2. 7.079 1,983,173.747 ↑ 12.9 2,000 1

Merge Join (cost=5,468,666.72..5,836,833.86 rows=25,750 width=8) (actual time=1,983,168.033..1,983,173.747 rows=2,000 loops=1)

  • Merge Cond: ((week."Effective Date" = rcs.start_date) AND ((week."Submitting BP ID")::text = (rcs.crm_id)::text) AND (week.country_id = rcs.country_id))
3. 107.493 109.869 ↑ 7.2 781 1

Sort (cost=516.63..530.63 rows=5,600 width=68) (actual time=109.720..109.869 rows=781 loops=1)

  • Sort Key: week."Effective Date", week."Submitting BP ID", week.country_id
  • Sort Method: quicksort Memory: 1433kB
4. 2.376 2.376 ↓ 2.4 13,421 1

Seq Scan on victory_lenovo_chan_man_week_records_simulation week (cost=0.00..168.00 rows=5,600 width=68) (actual time=0.006..2.376 rows=13,421 loops=1)

5. 1,971,837.682 1,983,056.799 ↑ 8,974.2 4,099 1

Sort (cost=5,468,150.08..5,560,113.49 rows=36,785,364 width=76) (actual time=1,983,053.447..1,983,056.799 rows=4,099 loops=1)

  • Sort Key: rcs.start_date, rcs.crm_id, rcs.country_id
  • Sort Method: external sort Disk: 2921504kB
6. 11,219.117 11,219.117 ↓ 1.8 64,971,522 1

Seq Scan on victory_lenovo_chan_man_all_records_complete_simulation rcs (cost=0.00..845,585.64 rows=36,785,364 width=76) (actual time=0.009..11,219.117 rows=64,971,522 loops=1)