explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7BHM

Settings
# exclusive inclusive rows x rows loops node
1. 0.294 7,282.005 ↑ 18.2 11 1

GroupAggregate (cost=64,473.86..64,490.96 rows=200 width=516) (actual time=7,281.703..7,282.005 rows=11 loops=1)

  • Group Key: y.gpa_gruppo, y.tipologia
  • loops=123)
  • '::bpchar))
  • loops=1)
2. 0.275 7,281.711 ↓ 2.3 455 1

Sort (cost=64,473.86..64,474.36 rows=200 width=516) (actual time=7,281.685..7,281.711 rows=455 loops=1)

  • Sort Key: y.gpa_gruppo, y.tipologia
  • Sort Method: quicksort Memory: 86kB
3. 0.067 7,281.436 ↓ 2.3 455 1

Subquery Scan on y (cost=64,417.82..64,466.22 rows=200 width=516) (actual time=7,280.652..7,281.436 rows=455 loops=1)

4. 0.707 7,281.369 ↓ 2.3 455 1

GroupAggregate (cost=64,417.82..64,465.62 rows=200 width=580) (actual time=7,280.651..7,281.369 rows=455 loops=1)

  • Group Key: x.gpa_gruppo, x.valore, x.tipo, x.tipologia
5. 0.729 7,280.662 ↑ 1.2 541 1

Sort (cost=64,417.82..64,419.43 rows=644 width=164) (actual time=7,280.633..7,280.662 rows=541 loops=1)

  • Sort Key: x.gpa_gruppo, x.valore, x.tipo, x.tipologia
  • Sort Method: quicksort Memory: 98kB
6. 0.085 7,279.933 ↑ 1.2 541 1

Subquery Scan on x (cost=64,384.23..64,387.77 rows=644 width=164) (actual time=7,279.823..7,279.933 rows=541 loops=1)

7. 1.191 7,279.848 ↑ 1.2 541 1

Sort (cost=64,384.23..64,385.84 rows=644 width=421) (actual time=7,279.821..7,279.848 rows=541 loops=1)

  • Sort Key: sngruppiart.gpa_gruppo
  • Sort Method: quicksort Memory: 135kB
8. 2.186 7,278.657 ↑ 1.2 541 1

Hash Left Join (cost=2,598.54..64,354.18 rows=644 width=421) (actual time=103.856..7,278.657 rows=541 loops=1)

  • Hash Cond: ("*SELECT* 1".categoria = sngruppiart.gpa_progressivo)
9. 0.333 7,276.444 ↑ 1.2 541 1

Append (cost=2,597.39..64,344.89 rows=644 width=92) (actual time=103.810..7,276.444 rows=541 loops=1)

10. 0.158 1,806.963 ↑ 5.2 123 1

Subquery Scan on *SELECT* 1 (cost=2,597.39..58,188.13 rows=638 width=92) (actual time=103.809..1,806.963 rows=123 loops=1)

11. 1,718.690 1,806.805 ↑ 5.2 123 1

Hash Left Join (cost=2,597.39..58,186.21 rows=638 width=204) (actual time=103.807..1,806.805 rows=123 loops=1)

  • Hash Cond: ((rvordinr.orv_gruppo = rvordint.orv_gruppo) AND (rvordinr.orv_numero = rvordint.orv_numero))
12. 0.284 70.378 ↑ 5.2 123 1

Hash Left Join (cost=2,118.57..4,225.40 rows=638 width=71) (actual time=60.348..70.378 rows=123 loops=1)

  • Hash Cond: (rvordinr.um_fat = snunitafat.um_fat)
13. 0.498 70.042 ↑ 5.2 123 1

Hash Join (cost=2,117.07..4,222.19 rows=638 width=67) (actual time=60.269..70.042 rows=123 loops=1)

  • Hash Cond: (rvordinr.articolo = snartico.articolo)
14. 0.530 23.703 ↑ 6.1 124 1

Hash Join (cost=1.44..2,104.57 rows=758 width=59) (actual time=14.196..23.703 rows=124 loops=1)

  • Hash Cond: (rvordinr.orv_gruppo = rvordinb.orv_gruppo)
15. 23.133 23.133 ↑ 6.8 143 1

Seq Scan on rvordinr (cost=0.00..2,100.46 rows=974 width=59) (actual time=0.289..23.133 rows=143 loops=1)

  • Filter: ((orv_situazione_riga <> 'S'::bpchar) AND (orv_consegna < '11-06-2019'::date))
  • Rows Removed by Filter: 45,783
16. 0.017 0.040 ↑ 1.0 28 1

Hash (cost=1.29..1.29 rows=28 width=7) (actual time=0.040..0.040 rows=28 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
17. 0.023 0.023 ↑ 1.0 28 1

Seq Scan on rvordinb (cost=0.00..1.29 rows=28 width=7) (actual time=0.007..0.023 rows=28 loops=1)

  • Filter: ((flag_tipo = 'O'::bpchar) AND (sede = 'AL'::bpchar))
  • Rows Removed by Filter: 8
18. 14.259 45.841 ↑ 1.0 32,224 1

Hash (cost=1,938.07..1,938.07 rows=32,284 width=29) (actual time=45.841..45.841 rows=32,224 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 2,176kB
19. 31.582 31.582 ↑ 1.0 32,224 1

Seq Scan on snartico (cost=0.00..1,938.07 rows=32,284 width=29) (actual time=0.016..31.582 rows=32,224 loops=1)

  • Filter: (tipologia = ANY ('{001,002,003,004,009}'::bpchar[]))
  • Rows Removed by Filter: 6,171
20. 0.026 0.052 ↑ 1.0 58 1

Hash (cost=1.17..1.17 rows=58 width=10) (actual time=0.052..0.052 rows=58 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
21. 0.026 0.026 ↑ 1.0 58 1

Seq Scan on snunitafat (cost=0.00..1.17 rows=58 width=10) (actual time=0.011..0.026 rows=58 loops=1)

22. 5.336 12.073 ↑ 1.0 14,400 1

Hash (cost=363.31..363.31 rows=14,438 width=17) (actual time=12.073..12.073 rows=14,400 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 747kB
23. 6.737 6.737 ↑ 1.0 14,400 1

Seq Scan on rvordint (cost=0.00..363.31 rows=14,438 width=17) (actual time=0.019..6.737 rows=14,400 loops=1)

24.          

SubPlan (for Hash Left Join)

25. 0.492 2.829 ↑ 1.0 1 123

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.022..0.023 rows=1 loops=123)

26. 2.073 2.337 ↓ 0.0 0 123

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.019..0.019 rows=0 loops=123)

  • -> Index Scan using bubolleridx1 on buboller (cost=0.29..8.30 rows=1 width=15) (actual time=0.014..0.014 rows=0
  • Index Cond: ((orv_gruppo = rvordinr.orv_gruppo) AND (orv_numero = rvordinr.orv_numero) AND (orv_riga = rvordinr.orv_riga))
27. 0.264 0.264 ↑ 1.0 1 24

Index Scan using bubollet_pkey on bubollet (cost=0.29..8.30 rows=1 width=11) (actual time=0.011..0.011 rows=1 loops=24)

  • Index Cond: ((bou_gruppo = buboller.bou_gruppo) AND (bou_numero = buboller.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
28. 0.246 0.984 ↑ 1.0 1 123

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=123)

29. 0.150 0.738 ↓ 0.0 0 123

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=123)

30. 0.492 0.492 ↓ 0.0 0 123

Index Scan using bubolleridx1 on buboller buboller_1 (cost=0.29..8.30 rows=1 width=15) (actual time=0.004..0.004 rows=0 loops=123)

  • Index Cond: ((orv_gruppo = rvordinr.orv_gruppo) AND (orv_numero = rvordinr.orv_numero) AND (orv_riga = rvordinr.orv_riga))
31. 0.096 0.096 ↑ 1.0 1 24

Index Scan using bubollet_pkey on bubollet bubollet_1 (cost=0.29..8.30 rows=1 width=11) (actual time=0.004..0.004 rows=1 loops=24)

  • Index Cond: ((bou_gruppo = buboller_1.bou_gruppo) AND (bou_numero = buboller_1.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
32. 0.123 0.861 ↑ 1.0 1 123

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=123)

33. 0.273 0.738 ↓ 0.0 0 123

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=123)

34. 0.369 0.369 ↓ 0.0 0 123

Index Scan using bubolleridx1 on buboller buboller_2 (cost=0.29..8.30 rows=1 width=15) (actual time=0.003..0.003 rows=0 loops=123)

  • Index Cond: ((orv_gruppo = rvordinr.orv_gruppo) AND (orv_numero = rvordinr.orv_numero) AND (orv_riga = rvordinr.orv_riga))
35. 0.096 0.096 ↑ 1.0 1 24

Index Scan using bubollet_pkey on bubollet bubollet_2 (cost=0.29..8.30 rows=1 width=11) (actual time=0.004..0.004 rows=1 loops=24)

  • Index Cond: ((bou_gruppo = buboller_2.bou_gruppo) AND (bou_numero = buboller_2.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
36. 0.242 0.968 ↑ 1.0 1 121

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=121)

37. 0.146 0.726 ↓ 0.0 0 121

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=121)

38. 0.484 0.484 ↓ 0.0 0 121

Index Scan using bubolleridx1 on buboller buboller_3 (cost=0.29..8.30 rows=1 width=15) (actual time=0.004..0.004 rows=0 loops=121)

  • Index Cond: ((orv_gruppo = rvordinr.orv_gruppo) AND (orv_numero = rvordinr.orv_numero) AND (orv_riga = rvordinr.orv_riga))
39. 0.096 0.096 ↑ 1.0 1 24

Index Scan using bubollet_pkey on bubollet bubollet_3 (cost=0.29..8.30 rows=1 width=11) (actual time=0.004..0.004 rows=1 loops=24)

  • Index Cond: ((bou_gruppo = buboller_3.bou_gruppo) AND (bou_numero = buboller_3.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
40. 0.004 0.022 ↑ 1.0 1 2

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=2)

41. 0.004 0.018 ↓ 0.0 0 2

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.009..0.009 rows=0 loops=2)

42. 0.014 0.014 ↓ 0.0 0 2

Index Scan using bubolleridx1 on buboller buboller_4 (cost=0.29..8.30 rows=1 width=15) (actual time=0.007..0.007 rows=0 loops=2)

  • Index Cond: ((orv_gruppo = rvordinr.orv_gruppo) AND (orv_numero = rvordinr.orv_numero) AND (orv_riga = rvordinr.orv_riga))
43. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_4 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_4.bou_gruppo) AND (bou_numero = buboller_4.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
44. 0.001 3.651 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=0.99..245.20 rows=1 width=92) (actual time=3.651..3.651 rows=0 loops=1)

45. 0.000 3.650 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.99..245.20 rows=1 width=204) (actual time=3.650..3.650 rows=0 loops=1)

46. 0.001 3.650 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.70..153.08 rows=1 width=71) (actual time=3.650..3.650 rows=0 loops=1)

  • Join Filter: (snunitafat_1.um_fat = rvordinr_1.um_fat)
47. 0.000 3.649 ↓ 0.0 0 1

Nested Loop (cost=0.70..151.59 rows=1 width=67) (actual time=3.649..3.649 rows=0 loops=1)

48. 0.243 3.649 ↓ 0.0 0 1

Nested Loop (cost=0.29..143.16 rows=1 width=59) (actual time=3.649..3.649 rows=0 loops=1)

  • Join Filter: (rvordinr_1.orv_gruppo = rvordinb_1.orv_gruppo)
49. 1.196 1.196 ↓ 442.0 442 1

Index Scan using rvordinridx2 on rvordinr rvordinr_1 (cost=0.29..141.87 rows=1 width=59) (actual time=0.036..1.196 rows=442 loops=1)

  • Index Cond: (orv_consegna >= '11-06-2019'::date)
  • Filter: ((orv_situazione_riga <> 'S'::bpchar) AND ('2019'::text = substr(((orv_consegna)::character varying)::text, 7, 4)) AND ('06'::text = substr(((orv_consegna)::character varying)::text, 4, 2)))
  • Rows Removed by Filter: 440
50. 2.210 2.210 ↓ 0.0 0 442

Seq Scan on rvordinb rvordinb_1 (cost=0.00..1.29 rows=1 width=7) (actual time=0.005..0.005 rows=0 loops=442)

  • Filter: ((flag_tipo = 'O'::bpchar) AND (sede = 'AL
  • Rows Removed by Filter: 36
51. 0.000 0.000 ↓ 0.0 0

Index Scan using snartico_pkey on snartico snartico_1 (cost=0.41..8.43 rows=1 width=29) (never executed)

  • Index Cond: (articolo = rvordinr_1.articolo)
  • Filter: (tipologia = ANY ('{001,002,003,004,009}'::bpchar[]))
52. 0.000 0.000 ↓ 0.0 0

Seq Scan on snunitafat snunitafat_1 (cost=0.00..1.17 rows=58 width=10) (never executed)

53. 0.000 0.000 ↓ 0.0 0

Index Scan using rvordint_pkey on rvordint rvordint_1 (cost=0.29..8.29 rows=1 width=17) (never executed)

  • Index Cond: ((orv_gruppo = rvordinr_1.orv_gruppo) AND (orv_numero = rvordinr_1.orv_numero))
54.          

SubPlan (for Nested Loop Left Join)

55. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=16.60..16.60 rows=1 width=8) (never executed)

56. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.60 rows=1 width=4) (never executed)

57. 0.000 0.000 ↓ 0.0 0

Index Scan using bubolleridx1 on buboller buboller_5 (cost=0.29..8.30 rows=1 width=15) (never executed)

  • Index Cond: ((orv_gruppo = rvordinr_1.orv_gruppo) AND (orv_numero = rvordinr_1.orv_numero) AND (orv_riga =rvordinr_1.orv_riga))
58. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_5 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_5.bou_gruppo) AND (bou_numero = buboller_5.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
59. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=16.60..16.60 rows=1 width=8) (never executed)

60. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.60 rows=1 width=4) (never executed)

61. 0.000 0.000 ↓ 0.0 0

Index Scan using bubolleridx1 on buboller buboller_6 (cost=0.29..8.30 rows=1 width=15) (never executed)

  • Index Cond: ((orv_gruppo = rvordinr_1.orv_gruppo) AND (orv_numero = rvordinr_1.orv_numero) AND (orv_riga =rvordinr_1.orv_riga))
62. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_6 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_6.bou_gruppo) AND (bou_numero = buboller_6.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
63. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=16.60..16.60 rows=1 width=8) (never executed)

64. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.60 rows=1 width=4) (never executed)

65. 0.000 0.000 ↓ 0.0 0

Index Scan using bubolleridx1 on buboller buboller_7 (cost=0.29..8.30 rows=1 width=15) (never executed)

  • Index Cond: ((orv_gruppo = rvordinr_1.orv_gruppo) AND (orv_numero = rvordinr_1.orv_numero) AND (orv_riga =rvordinr_1.orv_riga))
66. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_7 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_7.bou_gruppo) AND (bou_numero = buboller_7.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
67. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=16.60..16.60 rows=1 width=8) (never executed)

68. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.60 rows=1 width=4) (never executed)

69. 0.000 0.000 ↓ 0.0 0

Index Scan using bubolleridx1 on buboller buboller_8 (cost=0.29..8.30 rows=1 width=15) (never executed)

  • Index Cond: ((orv_gruppo = rvordinr_1.orv_gruppo) AND (orv_numero = rvordinr_1.orv_numero) AND (orv_riga =rvordinr_1.orv_riga))
70. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_8 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_8.bou_gruppo) AND (bou_numero = buboller_8.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
71. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=16.60..16.60 rows=1 width=8) (never executed)

72. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.60 rows=1 width=4) (never executed)

73. 0.000 0.000 ↓ 0.0 0

Index Scan using bubolleridx1 on buboller buboller_9 (cost=0.29..8.30 rows=1 width=15) (never executed)

  • Index Cond: ((orv_gruppo = rvordinr_1.orv_gruppo) AND (orv_numero = rvordinr_1.orv_numero) AND (orv_riga =rvordinr_1.orv_riga))
74. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_9 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_9.bou_gruppo) AND (bou_numero = buboller_9.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
75. 0.313 4,244.022 ↓ 320.0 320 1

Subquery Scan on *SELECT* 3 (cost=0.70..2,778.09 rows=1 width=92) (actual time=22.563..4,244.022 rows=320 loops=1)

76. 4,206.453 4,243.709 ↓ 320.0 320 1

Nested Loop Left Join (cost=0.70..2,778.09 rows=1 width=204) (actual time=22.562..4,243.709 rows=320 loops=1)

77. 1.721 26.694 ↓ 320.0 320 1

Nested Loop Left Join (cost=0.41..2,685.97 rows=1 width=71) (actual time=8.767..26.694 rows=320 loops=1)

  • Join Filter: (snunitafat_2.um_fat = rvordinr_2.um_fat)
  • Rows Removed by Join Filter: 11,994
78. 1.017 23.693 ↓ 320.0 320 1

Nested Loop (cost=0.41..2,684.48 rows=1 width=67) (actual time=8.755..23.693 rows=320 loops=1)

79. 15.276 17.876 ↓ 320.0 320 1

Nested Loop (cost=0.00..2,676.05 rows=1 width=59) (actual time=8.706..17.876 rows=320 loops=1)

  • Join Filter: (rvordinr_2.orv_gruppo = rvordinb_2.orv_gruppo)
  • Rows Removed by Join Filter: 8,612
  • -> Seq Scan on rvordinr rvordinr_2 (cost=0.00..2674.61 rows=1 width=59) (actual time=8.688..13.330 rows=325
  • Filter: ((orv_situazione_riga <> 'S'::bpchar) AND (date_part('year'::text, (orv_consegna)::timestamp without time zone) = '2019'::double precision) AND (date_part('month'::text, (orv_consegna)::timestamp without time zone) = '7'::double precision))
  • Rows Removed by Filter: 45,601
80. 2.600 2.600 ↑ 1.0 27 325

Seq Scan on rvordinb rvordinb_2 (cost=0.00..1.29 rows=28 width=7) (actual time=0.002..0.008 rows=27 loops=325)

  • Filter: ((flag_tipo = 'O'::bpchar) AND (sede = 'AL'::bpchar))
  • Rows Removed by Filter: 7
81. 4.800 4.800 ↑ 1.0 1 320

Index Scan using snartico_pkey on snartico snartico_2 (cost=0.41..8.43 rows=1 width=29) (actual time=0.015..0.015 rows=1 loops=320)

  • Index Cond: (articolo = rvordinr_2.articolo)
  • Filter: (tipologia = ANY ('{001,002,003,004,009}'::bpchar[]))
82. 1.280 1.280 ↑ 1.5 38 320

Seq Scan on snunitafat snunitafat_2 (cost=0.00..1.17 rows=58 width=10) (actual time=0.002..0.004 rows=38 loops=320)

83. 2.240 2.240 ↑ 1.0 1 320

Index Scan using rvordint_pkey on rvordint rvordint_2 (cost=0.29..8.29 rows=1 width=17) (actual time=0.007..0.007 rows=1 loops=320)

  • Index Cond: ((orv_gruppo = rvordinr_2.orv_gruppo) AND (orv_numero = rvordinr_2.orv_numero))
84.          

SubPlan (for Nested Loop Left Join)

85. 0.640 3.200 ↑ 1.0 1 320

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.010..0.010 rows=1 loops=320)

86. 0.640 2.560 ↓ 0.0 0 320

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=320)

87. 1.920 1.920 ↓ 0.0 0 320

Index Scan using bubolleridx1 on buboller buboller_10 (cost=0.29..8.30 rows=1 width=15) (actual time=0.006..0.006 rows=0 loops=320)

  • Index Cond: ((orv_gruppo = rvordinr_2.orv_gruppo) AND (orv_numero = rvordinr_2.orv_numero) AND (orv_riga =rvordinr_2.orv_riga))
88. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_10 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_10.bou_gruppo) AND (bou_numero = buboller_10.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
89. 0.320 1.600 ↑ 1.0 1 320

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=320)

90. 0.320 1.280 ↓ 0.0 0 320

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=320)

91. 0.960 0.960 ↓ 0.0 0 320

Index Scan using bubolleridx1 on buboller buboller_11 (cost=0.29..8.30 rows=1 width=15) (actual time=0.003..0.003 rows=0 loops=320)

  • Index Cond: ((orv_gruppo = rvordinr_2.orv_gruppo) AND (orv_numero = rvordinr_2.orv_numero) AND (orv_riga =rvordinr_2.orv_riga))
92. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_11 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_11.bou_gruppo) AND (bou_numero = buboller_11.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
93. 0.320 1.600 ↑ 1.0 1 320

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=320)

94. 0.320 1.280 ↓ 0.0 0 320

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=320)

95. 0.960 0.960 ↓ 0.0 0 320

Index Scan using bubolleridx1 on buboller buboller_12 (cost=0.29..8.30 rows=1 width=15) (actual time=0.003..0.003 rows=0 loops=320)

  • Index Cond: ((orv_gruppo = rvordinr_2.orv_gruppo) AND (orv_numero = rvordinr_2.orv_numero) AND (orv_riga =rvordinr_2.orv_riga))
96. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_12 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_12.bou_gruppo) AND (bou_numero = buboller_12.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
97. 0.318 1.908 ↑ 1.0 1 318

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=318)

98. 0.318 1.590 ↓ 0.0 0 318

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=318)

99. 1.272 1.272 ↓ 0.0 0 318

Index Scan using bubolleridx1 on buboller buboller_13 (cost=0.29..8.30 rows=1 width=15) (actual time=0.004..0.004 rows=0 loops=318)

  • Index Cond: ((orv_gruppo = rvordinr_2.orv_gruppo) AND (orv_numero = rvordinr_2.orv_numero) AND (orv_riga =rvordinr_2.orv_riga))
100. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_13 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_13.bou_gruppo) AND (bou_numero = buboller_13.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
101. 0.004 0.014 ↑ 1.0 1 2

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.007..0.007 rows=1 loops=2)

102. 0.002 0.010 ↓ 0.0 0 2

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=2)

103. 0.008 0.008 ↓ 0.0 0 2

Index Scan using bubolleridx1 on buboller buboller_14 (cost=0.29..8.30 rows=1 width=15) (actual time=0.004..0.004 rows=0 loops=2)

  • Index Cond: ((orv_gruppo = rvordinr_2.orv_gruppo) AND (orv_numero = rvordinr_2.orv_numero) AND (orv_riga =rvordinr_2.orv_riga))
104. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_14 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_14.bou_gruppo) AND (bou_numero = buboller_14.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
105. 0.020 295.169 ↓ 23.0 23 1

Subquery Scan on *SELECT* 4 (cost=0.70..2,778.09 rows=1 width=92) (actual time=22.887..295.169 rows=23 loops=1)

106. 281.977 295.149 ↓ 23.0 23 1

Nested Loop Left Join (cost=0.70..2,778.09 rows=1 width=204) (actual time=22.885..295.149 rows=23 loops=1)

107. 0.109 12.643 ↓ 23.0 23 1

Nested Loop Left Join (cost=0.41..2,685.97 rows=1 width=71) (actual time=9.701..12.643 rows=23 loops=1)

  • Join Filter: (snunitafat_3.um_fat = rvordinr_3.um_fat)
  • Rows Removed by Join Filter: 981
108. 0.032 12.442 ↓ 23.0 23 1

Nested Loop (cost=0.41..2,684.48 rows=1 width=67) (actual time=9.687..12.442 rows=23 loops=1)

109. 11.950 12.111 ↓ 23.0 23 1

Nested Loop (cost=0.00..2,676.05 rows=1 width=59) (actual time=9.663..12.111 rows=23 loops=1)

  • Join Filter: (rvordinr_3.orv_gruppo = rvordinb_3.orv_gruppo)
  • Rows Removed by Join Filter: 617
  • -> Seq Scan on rvordinr rvordinr_3 (cost=0.00..2674.61 rows=1 width=59) (actual time=9.645..11.822 rows=23loops=1)
  • Filter: ((orv_situazione_riga <> 'S'::bpchar) AND (date_part('year'::text, (orv_consegna)::timestamp without time zone) = '2019'::double precision) AND (date_part('month'::text, (orv_consegna)::timestamp without time zone) = '8'::double precision))
  • Rows Removed by Filter: 45,903
110. 0.161 0.161 ↑ 1.0 28 23

Seq Scan on rvordinb rvordinb_3 (cost=0.00..1.29 rows=28 width=7) (actual time=0.002..0.007 rows=28 loops=23)

  • Filter: ((flag_tipo = 'O'::bpchar) AND (sede = 'AL'::bpchar))
  • Rows Removed by Filter: 7
111. 0.299 0.299 ↑ 1.0 1 23

Index Scan using snartico_pkey on snartico snartico_3 (cost=0.41..8.43 rows=1 width=29) (actual time=0.013..0.013 rows=1 loops=23)

  • Index Cond: (articolo = rvordinr_3.articolo)
  • Filter: (tipologia = ANY ('{001,002,003,004,009}'::bpchar[]))
112. 0.092 0.092 ↑ 1.3 44 23

Seq Scan on snunitafat snunitafat_3 (cost=0.00..1.17 rows=58 width=10) (actual time=0.001..0.004 rows=44 loops=23)

113. 0.115 0.115 ↑ 1.0 1 23

Index Scan using rvordint_pkey on rvordint rvordint_3 (cost=0.29..8.29 rows=1 width=17) (actual time=0.005..0.005 rows=1 loops=23)

  • Index Cond: ((orv_gruppo = rvordinr_3.orv_gruppo) AND (orv_numero = rvordinr_3.orv_numero))
114.          

SubPlan (for Nested Loop Left Join)

115. 0.023 0.138 ↑ 1.0 1 23

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=23)

116. 0.023 0.115 ↓ 0.0 0 23

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=23)

117. 0.092 0.092 ↓ 0.0 0 23

Index Scan using bubolleridx1 on buboller buboller_15 (cost=0.29..8.30 rows=1 width=15) (actual time=0.004..0.004 rows=0 loops=23)

  • Index Cond: ((orv_gruppo = rvordinr_3.orv_gruppo) AND (orv_numero = rvordinr_3.orv_numero) AND (orv_riga =rvordinr_3.orv_riga))
118. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_15 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_15.bou_gruppo) AND (bou_numero = buboller_15.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
119. 0.023 0.092 ↑ 1.0 1 23

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=23)

120. 0.000 0.069 ↓ 0.0 0 23

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=23)

121. 0.069 0.069 ↓ 0.0 0 23

Index Scan using bubolleridx1 on buboller buboller_16 (cost=0.29..8.30 rows=1 width=15) (actual time=0.003..0.003 rows=0 loops=23)

  • Index Cond: ((orv_gruppo = rvordinr_3.orv_gruppo) AND (orv_numero = rvordinr_3.orv_numero) AND (orv_riga =rvordinr_3.orv_riga))
122. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_16 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_16.bou_gruppo) AND (bou_numero = buboller_16.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
123. 0.023 0.092 ↑ 1.0 1 23

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=23)

124. 0.000 0.069 ↓ 0.0 0 23

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=23)

125. 0.069 0.069 ↓ 0.0 0 23

Index Scan using bubolleridx1 on buboller buboller_17 (cost=0.29..8.30 rows=1 width=15) (actual time=0.003..0.003 rows=0 loops=23)

  • Index Cond: ((orv_gruppo = rvordinr_3.orv_gruppo) AND (orv_numero = rvordinr_3.orv_numero) AND (orv_riga =rvordinr_3.orv_riga))
126. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_17 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_17.bou_gruppo) AND (bou_numero = buboller_17.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
127. 0.000 0.092 ↑ 1.0 1 23

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=23)

128. 0.023 0.092 ↓ 0.0 0 23

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=23)

129. 0.069 0.069 ↓ 0.0 0 23

Index Scan using bubolleridx1 on buboller buboller_18 (cost=0.29..8.30 rows=1 width=15) (actual time=0.003..0.003 rows=0 loops=23)

  • Index Cond: ((orv_gruppo = rvordinr_3.orv_gruppo) AND (orv_numero = rvordinr_3.orv_numero) AND (orv_riga =rvordinr_3.orv_riga))
130. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_18 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_18.bou_gruppo) AND (bou_numero = buboller_18.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
131. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=16.60..16.60 rows=1 width=8) (never executed)

132. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.57..16.60 rows=1 width=4) (never executed)

133. 0.000 0.000 ↓ 0.0 0

Index Scan using bubolleridx1 on buboller buboller_19 (cost=0.29..8.30 rows=1 width=15) (never executed)

  • Index Cond: ((orv_gruppo = rvordinr_3.orv_gruppo) AND (orv_numero = rvordinr_3.orv_numero) AND (orv_riga =rvordinr_3.orv_riga))
134. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_19 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_19.bou_gruppo) AND (bou_numero = buboller_19.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
135. 0.052 926.306 ↓ 25.0 75 1

Subquery Scan on *SELECT* 5 (cost=3.92..355.38 rows=3 width=92) (actual time=12.392..926.306 rows=75 loops=1)

136. 922.603 926.254 ↓ 25.0 75 1

Nested Loop Left Join (cost=3.92..355.37 rows=3 width=204) (actual time=12.391..926.254 rows=75 loops=1)

137. 0.070 1.546 ↓ 25.0 75 1

Hash Left Join (cost=3.64..79.02 rows=3 width=71) (actual time=0.085..1.546 rows=75 loops=1)

  • Hash Cond: (rvordinr_4.um_fat = snunitafat_4.um_fat)
138. 0.160 1.452 ↓ 25.0 75 1

Nested Loop (cost=2.15..77.52 rows=3 width=67) (actual time=0.055..1.452 rows=75 loops=1)

139. 0.095 0.368 ↓ 19.2 77 1

Hash Join (cost=1.73..43.81 rows=4 width=59) (actual time=0.037..0.368 rows=77 loops=1)

  • Hash Cond: (rvordinr_4.orv_gruppo = rvordinb_4.orv_gruppo)
140. 0.255 0.255 ↓ 17.2 86 1

Index Scan using rvordinridx2 on rvordinr rvordinr_4 (cost=0.29..42.35 rows=5 width=59) (actual time=0.012..0.255 rows=86 loops=1)

  • Index Cond: (orv_consegna >= '01-09-2019'::date)
  • Filter: (orv_situazione_riga <> 'S'::bpchar)
141. 0.007 0.018 ↑ 1.0 28 1

Hash (cost=1.29..1.29 rows=28 width=7) (actual time=0.018..0.018 rows=28 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
142. 0.011 0.011 ↑ 1.0 28 1

Seq Scan on rvordinb rvordinb_4 (cost=0.00..1.29 rows=28 width=7) (actual time=0.004..0.011 rows=28 loops=1)

  • Filter: ((flag_tipo = 'O'::bpchar) AND (sede = 'AL'::bpchar))
  • Rows Removed by Filter: 8
143. 0.924 0.924 ↑ 1.0 1 77

Index Scan using snartico_pkey on snartico snartico_4 (cost=0.41..8.43 rows=1 width=29) (actual time=0.012..0.012 rows=1 loops=77)

  • Index Cond: (articolo = rvordinr_4.articolo)
  • Filter: (tipologia = ANY ('{001,002,003,004,009}'::bpchar[]))
  • Rows Removed by Filter: 0
144. 0.014 0.024 ↑ 1.0 58 1

Hash (cost=1.17..1.17 rows=58 width=10) (actual time=0.024..0.024 rows=58 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
145. 0.010 0.010 ↑ 1.0 58 1

Seq Scan on snunitafat snunitafat_4 (cost=0.00..1.17 rows=58 width=10) (actual time=0.003..0.010 rows=58 loops=1)

146. 0.375 0.375 ↑ 1.0 1 75

Index Scan using rvordint_pkey on rvordint rvordint_4 (cost=0.29..8.29 rows=1 width=17) (actual time=0.005..0.005 rows=1 loops=75)

  • Index Cond: ((orv_gruppo = rvordinr_4.orv_gruppo) AND (orv_numero = rvordinr_4.orv_numero))
147.          

SubPlan (for Nested Loop Left Join)

148. 0.150 0.600 ↑ 1.0 1 75

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=75)

149. 0.000 0.450 ↓ 0.0 0 75

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=75)

150. 0.450 0.450 ↓ 0.0 0 75

Index Scan using bubolleridx1 on buboller buboller_20 (cost=0.29..8.30 rows=1 width=15) (actual time=0.006..0.006 rows=0 loops=75)

  • Index Cond: ((orv_gruppo = rvordinr_4.orv_gruppo) AND (orv_numero = rvordinr_4.orv_numero) AND (orv_riga =rvordinr_4.orv_riga))
151. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_20 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_20.bou_gruppo) AND (bou_numero = buboller_20.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
152. 0.075 0.375 ↑ 1.0 1 75

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=75)

153. 0.000 0.300 ↓ 0.0 0 75

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=75)

154. 0.300 0.300 ↓ 0.0 0 75

Index Scan using bubolleridx1 on buboller buboller_21 (cost=0.29..8.30 rows=1 width=15) (actual time=0.004..0.004 rows=0 loops=75)

  • Index Cond: ((orv_gruppo = rvordinr_4.orv_gruppo) AND (orv_numero = rvordinr_4.orv_numero) AND (orv_riga =rvordinr_4.orv_riga))
155. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_21 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_21.bou_gruppo) AND (bou_numero = buboller_21.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
156. 0.075 0.375 ↑ 1.0 1 75

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=75)

157. 0.000 0.300 ↓ 0.0 0 75

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=75)

158. 0.300 0.300 ↓ 0.0 0 75

Index Scan using bubolleridx1 on buboller buboller_22 (cost=0.29..8.30 rows=1 width=15) (actual time=0.004..0.004 rows=0 loops=75)

  • Index Cond: ((orv_gruppo = rvordinr_4.orv_gruppo) AND (orv_numero = rvordinr_4.orv_numero) AND (orv_riga =rvordinr_4.orv_riga))
159. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_22 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_22.bou_gruppo) AND (bou_numero = buboller_22.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
160. 0.000 0.350 ↑ 1.0 1 70

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=70)

161. 0.070 0.350 ↓ 0.0 0 70

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=70)

162. 0.280 0.280 ↓ 0.0 0 70

Index Scan using bubolleridx1 on buboller buboller_23 (cost=0.29..8.30 rows=1 width=15) (actual time=0.004..0.004 rows=0 loops=70)

  • Index Cond: ((orv_gruppo = rvordinr_4.orv_gruppo) AND (orv_numero = rvordinr_4.orv_numero) AND (orv_riga =rvordinr_4.orv_riga))
163. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_23 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_23.bou_gruppo) AND (bou_numero = buboller_23.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
164. 0.005 0.030 ↑ 1.0 1 5

Aggregate (cost=16.60..16.60 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=5)

165. 0.005 0.025 ↓ 0.0 0 5

Nested Loop (cost=0.57..16.60 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=5)

166. 0.020 0.020 ↓ 0.0 0 5

Index Scan using bubolleridx1 on buboller buboller_24 (cost=0.29..8.30 rows=1 width=15) (actual time=0.004..0.004 rows=0 loops=5)

  • Index Cond: ((orv_gruppo = rvordinr_4.orv_gruppo) AND (orv_numero = rvordinr_4.orv_numero) AND (orv_riga =rvordinr_4.orv_riga))
167. 0.000 0.000 ↓ 0.0 0

Index Scan using bubollet_pkey on bubollet bubollet_24 (cost=0.29..8.30 rows=1 width=11) (never executed)

  • Index Cond: ((bou_gruppo = buboller_24.bou_gruppo) AND (bou_numero = buboller_24.bou_numero))
  • Filter: (bou_data <= '11-06-2019'::date)
168. 0.013 0.027 ↑ 1.0 18 1

Hash (cost=1.05..1.05 rows=18 width=31) (actual time=0.026..0.027 rows=18 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
169. 0.014 0.014 ↑ 1.0 18 1

Seq Scan on sngruppiart (cost=0.00..1.05 rows=18 width=31) (actual time=0.009..0.014 rows=18 loops=1)

Planning time : 45.243 ms
Execution time : 7,287.291 ms