explain.depesz.com

PostgreSQL's explain analyze made readable

Result: INz5 : Optimization for: plan #79Q4

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.094 40,631.769 ↓ 109.0 109 1

Group (cost=477,940.63..477,940.64 rows=1 width=31) (actual time=40,631.644..40,631.769 rows=109 loops=1)

  • Group Key: bebollet.sottoconto, snsottoc.sot_descrizione
2. 3.503 40,631.675 ↓ 699.0 699 1

Sort (cost=477,940.63..477,940.64 rows=1 width=31) (actual time=40,631.643..40,631.675 rows=699 loops=1)

  • Sort Key: bebollet.sottoconto, snsottoc.sot_descrizione
  • Sort Method: quicksort Memory: 76kB
3. 867.125 40,628.172 ↓ 699.0 699 1

Nested Loop (cost=1.25..477,940.62 rows=1 width=31) (actual time=99.249..40,628.172 rows=699 loops=1)

  • Join Filter: (bebollet.sottoconto = snsottoc.sottoconto)
  • Rows Removed by Join Filter: 7721353
4. 7,041.593 38,707.654 ↓ 699.0 699 1

Nested Loop (cost=1.25..476,963.65 rows=1 width=7) (actual time=93.573..38,707.654 rows=699 loops=1)

  • Join Filter: ((beboller.boe_gruppo = bebollet.boe_gruppo) AND (beboller.boe_numero = bebollet.boe_numero))
  • Rows Removed by Join Filter: 96854549
5. 3,247.428 19,633.475 ↓ 699.0 699 1

Nested Loop (cost=1.25..473,968.79 rows=1 width=11) (actual time=42.405..19,633.475 rows=699 loops=1)

  • Join Filter: (beboller.articolo = snartico.articolo)
  • Rows Removed by Join Filter: 35823123
6. 1.161 697.691 ↓ 699.0 699 1

Nested Loop (cost=1.25..470,211.15 rows=1 width=53) (actual time=1.160..697.691 rows=699 loops=1)

  • Join Filter: (beboller.magazzino_pd = snmagazz.magazzino)
  • Rows Removed by Join Filter: 1398
7. 0.032 0.032 ↓ 3.0 3 1

Index Scan using snmagazz_idx1 on snmagazz (cost=0.27..2.28 rows=1 width=11) (actual time=0.027..0.032 rows=3 loops=1)

  • Index Cond: (ubi_magazzino = 'AC'::bpchar)
8. 91.791 696.498 ↓ 77.7 699 3

Nested Loop (cost=0.98..470,208.83 rows=9 width=64) (actual time=0.620..232.166 rows=699 loops=3)

9. 135.690 135.690 ↑ 1.8 52,113 3

Index Scan using mumovimr_loc on mumovimr movb (cost=0.56..43,704.64 rows=96,165 width=25) (actual time=0.089..45.230 rows=52,113 loops=3)

  • Index Cond: ((ubi_magazzino = 'AC'::bpchar) AND (ubi_scaffale = '0'::bpchar))
10. 345.600 469.017 ↓ 0.0 0 156,339

Index Scan using beboller_idx2 on beboller (cost=0.42..4.43 rows=1 width=47) (actual time=0.003..0.003 rows=0 loops=156,339)

  • Index Cond: (mut_id = movb.mut_id)
  • Filter: ((COALESCE(boe_accettazione, ''::bpchar) <> ALL ('{1,2}'::bpchar[])) AND (movb.articolo = articolo) AND ((boe_qta - COALESCE((SubPlan 1),
  • Rows Removed by Filter: 1
11.          

SubPlan (forIndex Scan)

12. 35.262 123.417 ↑ 1.0 1 5,877

Aggregate (cost=3.90..3.90 rows=1 width=32) (actual time=0.021..0.021 rows=1 loops=5,877)

13. 23.508 88.155 ↓ 5.0 5 5,877

Bitmap Heap Scan on mumovimr (cost=2.88..3.89 rows=1 width=5) (actual time=0.013..0.015 rows=5 loops=5,877)

  • Recheck Cond: (((mut_id = beboller.mut_id) AND (ubi_magazzino = 'AC'::bpchar) AND (ubi_scaffale = 'CO'::bpchar)) OR ((mut_id = bebo
  • Heap Blocks: exact=12624
14. 5.877 64.647 ↓ 0.0 0 5,877

BitmapOr (cost=2.88..2.88 rows=1 width=0) (actual time=0.011..0.011 rows=0 loops=5,877)

15. 41.139 41.139 ↓ 3.0 3 5,877

Bitmap Index Scan on mumovimr_mutloc (cost=0.00..1.44 rows=1 width=0) (actual time=0.007..0.007 rows=3 loops=5,877)

  • Index Cond: ((mut_id = beboller.mut_id) AND (ubi_magazzino = 'AC'::bpchar) AND (ubi_scaffale = 'CO'::bpchar))
16. 17.631 17.631 ↓ 2.0 2 5,877

Bitmap Index Scan on mumovimr_mutloc (cost=0.00..1.44 rows=1 width=0) (actual time=0.003..0.003 rows=2 loops=5,877)

  • Index Cond: ((mut_id = beboller.mut_id) AND (ubi_magazzino = 'AC'::bpchar) AND (ubi_scaffale = 'CQ'::bpchar))
17. 15,688.356 15,688.356 ↑ 1.2 51,250 699

Seq Scan on snartico (cost=0.00..3,432.26 rows=59,159 width=21) (actual time=0.005..22.444 rows=51,250 loops=699)

  • Filter: (art_magazzino IS NOT FALSE)
  • Rows Removed by Filter: 220
18. 12,032.586 12,032.586 ↑ 1.0 138,563 699

Seq Scan on bebollet (cost=0.00..1,879.33 rows=139,442 width=18) (actual time=0.005..17.214 rows=138,563 loops=699)

  • Filter: (boe_situazione IS NOT TRUE)
  • Rows Removed by Filter: 4
19. 1,053.393 1,053.393 ↑ 1.1 11,047 699

Seq Scan on snsottoc (cost=0.00..907.75 rows=12,585 width=31) (actual time=0.003..1.507 rows=11,047 loops=699)