explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Nu6

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 289,187.261 ↓ 0.0 0 1

Insert on tsc_stage_as_bsngp_itm_ext (cost=1.69..5,711,473.60 rows=1 width=33) (actual time=289,187.261..289,187.261 rows=0 loops=1)

  • Merge Cond: ((a.id_bsngp = c.id_bsngp) AND ((a.id_itm)::text = (c.id_itm)::text) AND (a.ts_ef = c.ts_ef))
  • Join Filter: ((a.id_gp_tx_alt)::text = (c.id_gp_tx_alt)::text)
  • Rows Removed by Join Filter: 201270
  • Index Cond: ((id_bsngp = a.id_bsngp) AND (id_itm = (a.id_itm)::text) AND (ts_ef = a.ts_ef))
  • Heap Fetches: 0
2. 287,134.947 287,134.947 ↓ 281,617.0 281,617 1

Nested Loop Left Join (cost=1.69..5,711,473.60 rows=1 width=33) (actual time=395.286..287,134.947 rows=281,617 loops=1)

3. 258,606.329 258,606.329 ↓ 281,617.0 281,617 1

Merge Anti Join (cost=1.13..5,711,472.95 rows=1 width=25) (actual time=395.246..258,606.329 rows=281,617 loops=1)

4. 140,643.673 140,643.673 ↑ 1.0 27,718,356 1

Index Scan using tsc_import_as_bsngp_itm_pkey on tsc_import_as_bsngp_itm a (cost=0.56..2,166,784.98 rows=27,718,456 width=25) (actual time=0.009..140,643.673 rows=27,718,356 loops=1)

5. 80,953.477 80,953.477 ↑ 1.0 40,425,447 1

Index Scan using as_bsngp_itm_ext_pkey on as_bsngp_itm_ext c (cost=0.56..2,719,928.04 rows=40,478,692 width=25) (actual time=0.007..80,953.477 rows=40,425,447 loops=1)

6. 28,161.700 28,161.700 ↑ 1.0 1 281,617

Index Only Scan using as_bsngp_itm_pkey on as_bsngp_itm b (cost=0.56..0.63 rows=1 width=19) (actual time=0.099..0.100 rows=1 loops=281,617)

Planning time : 133.942 ms