explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AOGU

Settings
# exclusive inclusive rows x rows loops node
1. 17.668 259.519 ↓ 5,192.0 67,496 1

Nested Loop (cost=6,815.96..172,203.58 rows=13 width=77) (actual time=39.826..259.519 rows=67,496 loops=1)

2. 1.214 231.467 ↓ 5,192.0 5,192 1

Nested Loop Left Join (cost=6,815.96..172,202.26 rows=1 width=77) (actual time=39.809..231.467 rows=5,192 loops=1)

  • Filter: (c.dt_cancel IS NULL)
3. 2.085 219.869 ↓ 5,192.0 5,192 1

Nested Loop (cost=6,815.54..172,195.78 rows=1 width=65) (actual time=39.801..219.869 rows=5,192 loops=1)

4. 2.812 207.400 ↓ 5,192.0 5,192 1

Nested Loop (cost=6,815.11..172,189.32 rows=1 width=63) (actual time=39.793..207.400 rows=5,192 loops=1)

5. 2.490 193.642 ↓ 5,473.0 5,473 1

Nested Loop (cost=6,814.69..172,182.88 rows=1 width=57) (actual time=39.784..193.642 rows=5,473 loops=1)

  • Join Filter: (t_caso_1.id_caso_p = t_caso.id_caso)
  • Rows Removed by Join Filter: 2807
6. 17.767 180.198 ↓ 156.5 5,477 1

Nested Loop (cost=6,814.26..171,927.59 rows=35 width=35) (actual time=39.776..180.198 rows=5,477 loops=1)

7. 31.379 72.919 ↓ 2.0 44,756 1

Hash Right Join (cost=6,813.83..8,146.27 rows=22,440 width=35) (actual time=39.759..72.919 rows=44,756 loops=1)

  • Hash Cond: (t_vetrino_test.id_vetrino = t_vetrino.id_vetrino)
8. 1.802 1.802 ↓ 1.0 29,919 1

Seq Scan on t_vetrino_test (cost=0.00..1,040.93 rows=29,893 width=7) (actual time=0.003..1.802 rows=29,919 loops=1)

9. 7.263 39.738 ↓ 2.0 44,755 1

Hash (cost=6,533.33..6,533.33 rows=22,440 width=36) (actual time=39.738..39.738 rows=44,755 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 2202kB
10. 13.829 32.475 ↓ 2.0 44,755 1

Hash Left Join (cost=1,156.19..6,533.33 rows=22,440 width=36) (actual time=3.682..32.475 rows=44,755 loops=1)

  • Hash Cond: ((t_vetrino.id_colorazione)::text = (t_colorazione.id_colorazione)::text)
  • Filter: (((t_colorazione.tp_colorazione)::text <> 'R'::text) OR (t_vetrino.id_colorazione IS NULL))
11. 15.442 18.631 ↓ 2.0 44,755 1

Bitmap Heap Scan on t_vetrino (cost=1,154.17..6,275.26 rows=22,799 width=37) (actual time=3.660..18.631 rows=44,755 loops=1)

  • Recheck Cond: (user_consegna = 0)
  • Filter: ((dt_cancel IS NULL) AND (annullato IS NULL) AND (user_taglio = 0))
  • Rows Removed by Filter: 17121
12. 3.189 3.189 ↓ 1.0 61,876 1

Bitmap Index Scan on i_vetrino1 (cost=0.00..1,148.47 rows=61,873 width=0) (actual time=3.189..3.189 rows=61,876 loops=1)

  • Index Cond: (user_consegna = 0)
13. 0.006 0.015 ↑ 1.0 38 1

Hash (cost=1.55..1.55 rows=38 width=6) (actual time=0.015..0.015 rows=38 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
14. 0.009 0.009 ↑ 1.0 38 1

Seq Scan on t_colorazione (cost=0.00..1.55 rows=38 width=6) (actual time=0.003..0.009 rows=38 loops=1)

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 17
15. 89.512 89.512 ↓ 0.0 0 44,756

Index Scan using p_t_caso on t_caso t_caso_1 (cost=0.43..7.29 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=44,756)

  • Index Cond: (id_caso = t_vetrino.id_caso)
  • Filter: ((dt_cancel IS NULL) AND ((fl_stato)::text <> ALL ('{I,P,V,R,Z,F}'::text[])))
  • Rows Removed by Filter: 1
16. 10.954 10.954 ↓ 2.0 2 5,477

Index Scan using t_caso2 on t_caso (cost=0.43..7.28 rows=1 width=34) (actual time=0.001..0.002 rows=2 loops=5,477)

  • Index Cond: (id_acc_mat = t_vetrino.id_acc_mat)
  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 0
17. 10.946 10.946 ↑ 1.0 1 5,473

Index Scan using p_t_blocchetto on t_blocchetto b (cost=0.42..6.43 rows=1 width=14) (actual time=0.002..0.002 rows=1 loops=5,473)

  • Index Cond: (id_blocchetto = t_vetrino.id_blocchetto)
  • Filter: ((dt_cancel IS NULL) AND ((tp_blocchetto)::text <> 'P'::text))
  • Rows Removed by Filter: 0
18. 10.384 10.384 ↑ 1.0 1 5,192

Index Scan using p_t_prelievo on t_prelievo (cost=0.43..6.46 rows=1 width=10) (actual time=0.002..0.002 rows=1 loops=5,192)

  • Index Cond: (id_prelievo = b.id_prelievo)
  • Filter: ((dt_cancel IS NULL) AND ((cd_prelievo)::text <> '-'::text))
19. 10.384 10.384 ↑ 1.0 1 5,192

Index Scan using p_t_campionamento on t_campionamento c (cost=0.43..6.46 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=5,192)

  • Index Cond: (b.id_campionamento = id_campionamento)
20. 10.384 10.384 ↑ 1.0 13 5,192

Seq Scan on t_tp_accesso (cost=0.00..1.19 rows=13 width=0) (actual time=0.001..0.002 rows=13 loops=5,192)

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 6
Total runtime : 261.735 ms