explain.depesz.com

PostgreSQL's explain analyze made readable

Result: G55SK

Settings
# exclusive inclusive rows x rows loops node
1. 347.815 16,783.141 ↓ 198.7 2,574,580 1

Subquery Scan on b (cost=7,922,136.73..8,019,296.46 rows=12,955 width=2,210) (actual time=11,733.188..16,783.141 rows=2,574,580 loops=1)

  • Filter: (b.rn = 1)
  • Rows Removed by Filter: 30,201
2. 1,742.169 16,435.326 ↓ 1.0 2,604,781 1

WindowAgg (cost=7,922,136.73..7,986,909.88 rows=2,590,926 width=2,218) (actual time=11,733.181..16,435.326 rows=2,604,781 loops=1)

3. 11,792.966 14,693.157 ↓ 1.0 2,604,781 1

Sort (cost=7,922,136.73..7,928,614.05 rows=2,590,926 width=2,210) (actual time=11,733.174..14,693.157 rows=2,604,781 loops=1)

  • Sort Key: a.store_locn_cid, a.pi_grp_code, a.cnt_type_code, a.src_applctn_pstng_dttm DESC
  • Sort Method: external merge Disk: 257,616kB
4. 313.601 2,900.191 ↓ 1.0 2,604,781 1

Subquery Scan on a (cost=43.31..207,339.37 rows=2,590,926 width=2,210) (actual time=1.110..2,900.191 rows=2,604,781 loops=1)

5. 203.084 2,586.590 ↓ 1.0 2,604,781 1

Append (cost=43.31..181,430.11 rows=2,590,926 width=2,210) (actual time=1.109..2,586.590 rows=2,604,781 loops=1)

6. 3.679 4.736 ↓ 10.7 7,172 1

Bitmap Heap Scan on physical_inventory (cost=43.31..1,767.65 rows=672 width=149) (actual time=1.108..4.736 rows=7,172 loops=1)

  • Recheck Cond: (((eventtype)::text = 'InventoryAllCount'::text) AND ((count_type)::text = 'FULL'::text))
  • Heap Blocks: exact=443
7. 1.057 1.057 ↓ 10.7 7,172 1

Bitmap Index Scan on idx_physical_inventory_soh2 (cost=0.00..43.14 rows=672 width=0) (actual time=1.057..1.057 rows=7,172 loops=1)

  • Index Cond: (((eventtype)::text = 'InventoryAllCount'::text) AND ((count_type)::text = 'FULL'::text))
8. 658.322 2,378.770 ↓ 1.0 2,597,609 1

Subquery Scan on *SELECT* 2 (cost=0.00..179,655.74 rows=2,590,254 width=1,749) (actual time=0.019..2,378.770 rows=2,597,609 loops=1)

9. 1,720.448 1,720.448 ↓ 1.0 2,597,609 1

Seq Scan on l_cutover_pi_soh (cost=0.00..147,277.57 rows=2,590,254 width=1,749) (actual time=0.013..1,720.448 rows=2,597,609 loops=1)

  • Filter: ((inventorystatus)::text = ANY ('{Received,Returned}'::text[]))
  • Rows Removed by Filter: 730,670