explain.depesz.com

PostgreSQL's explain analyze made readable

Result: a5l3

Settings
# exclusive inclusive rows x rows loops node
1. 1.212 422,285.058 ↓ 95.3 286 1

Sort (cost=488,216.06..488,216.07 rows=3 width=123) (actual time=422,285.045..422,285.058 rows=286 loops=1)

  • Sort Key: beboller.boe_gruppo, beboller.boe_numero, beboller.boe_riga
  • Sort Method: quicksort Memory: 65kB
2. 5.444 422,283.846 ↓ 95.3 286 1

Nested Loop (cost=4.36..488,216.04 rows=3 width=123) (actual time=5,633.401..422,283.846 rows=286 loops=1)

3. 1.112 18.100 ↑ 1.1 283 1

Hash Join (cost=3.94..673.59 rows=315 width=29) (actual time=2.003..18.100 rows=283 loops=1)

  • Hash Cond: (bebollet.boe_gruppo = bebolleb.boe_gruppo)
4. 16.562 16.562 ↓ 1.1 802 1

Index Scan using bebolletidx2 on bebollet (cost=0.42..665.89 rows=746 width=19) (actual time=0.793..16.562 rows=802 loops=1)

  • Index Cond: ((boe_data >= '01-11-2018'::date) AND (boe_data <= '29-11-2018'::date))
5. 0.016 0.426 ↑ 1.0 82 1

Hash (cost=3.07..3.07 rows=82 width=10) (actual time=0.426..0.426 rows=82 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
6. 0.410 0.410 ↑ 1.0 82 1

Seq Scan on bebolleb (cost=0.00..3.07 rows=82 width=10) (actual time=0.386..0.410 rows=82 loops=1)

  • Filter: (sede = 'RO'::bpchar)
  • Rows Removed by Filter: 112
7. 10.188 10.188 ↑ 1.0 1 283

Index Scan using beboller_pkey on beboller (cost=0.42..6.89 rows=1 width=80) (actual time=0.031..0.036 rows=1 loops=283)

  • Index Cond: ((boe_gruppo = bebollet.boe_gruppo) AND (boe_numero = bebollet.boe_numero))
  • Filter: (substr((articolo)::text, 1, 1) = '1'::text)
  • Rows Removed by Filter: 1
8.          

SubPlan (forNested Loop)

9. 0.572 4.576 ↑ 1.0 1 286

Aggregate (cost=8.44..8.44 rows=1 width=8) (actual time=0.016..0.016 rows=1 loops=286)

10. 4.004 4.004 ↓ 0.0 0 286

Index Scan using sntubiidx14 on sntubi (cost=0.43..8.44 rows=1 width=4) (actual time=0.014..0.014 rows=0 loops=286)

  • Index Cond: ((boe_gruppo = beboller.boe_gruppo) AND (boe_numero = beboller.boe_numero) AND (boe_riga = beboller.boe_riga))
11. 2.002 420,618.770 ↑ 1.0 1 286

Aggregate (cost=157,572.24..157,572.25 rows=1 width=8) (actual time=1,470.695..1,470.695 rows=1 loops=286)

12. 420,616.768 420,616.768 ↓ 0.0 0 286

Seq Scan on snnastri (cost=0.00..157,572.24 rows=1 width=4) (actual time=1,466.277..1,470.688 rows=0 loops=286)

  • Filter: ((boe_gruppo = beboller.boe_gruppo) AND (boe_numero = beboller.boe_numero) AND (boe_riga = beboller.boe_riga))
  • Rows Removed by Filter: 4450785
13. 1.716 1,080.508 ↑ 1.0 1 286

Aggregate (cost=2,247.01..2,247.01 rows=1 width=8) (actual time=3.778..3.778 rows=1 loops=286)

14. 1,078.792 1,078.792 ↑ 1.0 1 286

Index Scan using sncoilsidx4 on sncoils (cost=0.42..2,247.00 rows=1 width=4) (actual time=3.676..3.772 rows=1 loops=286)

  • Index Cond: ((boe_numero = beboller.boe_numero) AND (boe_riga = beboller.boe_riga))
  • Filter: ((boe_gruppo)::bpchar = beboller.boe_gruppo)
  • Rows Removed by Filter: 24
15. 0.858 546.260 ↑ 1.0 1 286

Aggregate (cost=1,963.01..1,963.01 rows=1 width=8) (actual time=1.910..1.910 rows=1 loops=286)

16. 545.402 545.402 ↓ 0.0 0 286

Index Scan using sncoilsidx10 on sncoils sncoils_1 (cost=0.42..1,963.00 rows=1 width=4) (actual time=1.592..1.907 rows=0 loops=286)

  • Index Cond: ((ble_numero = beboller.boe_numero) AND (ble_riga = beboller.boe_riga))
  • Filter: ((ble_gruppo)::bpchar = beboller.boe_gruppo)
  • Rows Removed by Filter: 8