explain.depesz.com

PostgreSQL's explain analyze made readable

Result: A1nn

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 738,226.884 ↓ 0.0 0 1

Insert on tsc_stage_as_bsngp_itm (cost=2.56..6,546,563.15 rows=1 width=120) (actual time=738,226.884..738,226.884 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 = c.id_gp_tx)
  • Rows Removed by Join Filter: 31371
  • Index Cond: ((a.id_bsngp = id_bsngp) AND ((a.id_itm)::text = (id_itm)::text) AND (a.ts_ef = ts_ef))
  • Index Cond: ((a.id_bsngp = id_bsngp) AND ((a.id_itm)::text = (id_itm)::text))
  • Index Cond: ((a.id_bsngp = id_bsngp) AND ((a.id_itm)::text = (id_itm)::text))
2. 735,747.648 735,747.648 ↓ 111,718.0 111,718 1

Nested Loop Left Join (cost=2.56..6,546,563.15 rows=1 width=120) (actual time=1,750.346..735,747.648 rows=111,718 loops=1)

3. 731,113.372 731,113.372 ↓ 111,718.0 111,718 1

Nested Loop Left Join (cost=2.12..6,546,562.68 rows=1 width=39) (actual time=1,750.293..731,113.372 rows=111,718 loops=1)

4. 716,615.432 716,615.432 ↓ 111,718.0 111,718 1

Nested Loop Left Join (cost=1.69..6,546,562.19 rows=1 width=35) (actual time=1,750.263..716,615.432 rows=111,718 loops=1)

5. 715,476.805 715,476.805 ↓ 111,718.0 111,718 1

Merge Anti Join (cost=1.13..6,546,561.49 rows=1 width=23) (actual time=1,750.229..715,476.805 rows=111,718 loops=1)

6. 368,306.567 368,306.567 ↑ 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=23) (actual time=0.035..368,306.567 rows=27,718,356 loops=1)

7. 309,483.986 309,483.986 ↑ 1.0 40,425,447 1

Index Scan using as_bsngp_itm_pkey on as_bsngp_itm c (cost=0.56..3,537,186.03 rows=40,622,288 width=23) (actual time=0.010..309,483.986 rows=40,425,447 loops=1)

8. 1,005.462 1,005.462 ↓ 0.0 0 111,718

Index Scan using as_bsngp_itm_pkey on as_bsngp_itm b (cost=0.56..0.69 rows=1 width=27) (actual time=0.009..0.009 rows=0 loops=111,718)

9. 14,411.622 14,411.622 ↑ 1.0 1 111,718

Index Scan using tsc_stage_ru_itm_sl_prc_pkey on tsc_stage_ru_itm_sl_prc p (cost=0.43..0.47 rows=1 width=16) (actual time=0.120..0.129 rows=1 loops=111,718)

10. 4,468.720 4,468.720 ↑ 1.0 1 111,718

Index Scan using tsc_stage_ru_itm_sl_pkey on tsc_stage_ru_itm_sl s (cost=0.43..0.46 rows=1 width=16) (actual time=0.037..0.040 rows=1 loops=111,718)

Planning time : 61.395 ms