explain.depesz.com

PostgreSQL's explain analyze made readable

Result: d05Y

Settings
# exclusive inclusive rows x rows loops node
1. 0.324 513.011 ↓ 2,783.0 2,783 1

Unique (cost=211,177.49..211,177.50 rows=1 width=4) (actual time=512.487..513.011 rows=2,783 loops=1)

2. 0.879 512.687 ↓ 3,080.0 3,080 1

Sort (cost=211,177.49..211,177.50 rows=1 width=4) (actual time=512.485..512.687 rows=3,080 loops=1)

  • Sort Key: v_no_ass3.id_caso
  • Sort Method: quicksort Memory: 241kB
3. 0.175 511.808 ↓ 3,080.0 3,080 1

Subquery Scan on v_no_ass3 (cost=211,177.46..211,177.48 rows=1 width=4) (actual time=510.198..511.808 rows=3,080 loops=1)

4. 14.658 511.633 ↓ 3,080.0 3,080 1

HashAggregate (cost=211,177.46..211,177.47 rows=1 width=95) (actual time=510.197..511.633 rows=3,080 loops=1)

5. 4.807 496.975 ↓ 7,804.0 7,804 1

Nested Loop Left Join (cost=4,177.21..211,177.41 rows=1 width=95) (actual time=24.952..496.975 rows=7,804 loops=1)

  • Filter: (c.dt_cancel IS NULL)
6. 5.609 476.560 ↓ 7,804.0 7,804 1

Nested Loop (cost=4,176.78..211,170.88 rows=1 width=83) (actual time=24.942..476.560 rows=7,804 loops=1)

7. 0.000 455.343 ↓ 7,804.0 7,804 1

Nested Loop (cost=4,176.36..211,164.36 rows=1 width=81) (actual time=24.932..455.343 rows=7,804 loops=1)

8. 36.219 430.997 ↓ 8,221.0 8,221 1

Nested Loop (cost=4,175.94..211,157.84 rows=1 width=75) (actual time=24.874..430.997 rows=8,221 loops=1)

  • Join Filter: ((t_caso.tp_accesso)::text = (t_tp_accesso.tp_accesso)::text)
  • Rows Removed by Join Filter: 106873
9. 7.105 378.336 ↓ 8,221.0 8,221 1

Nested Loop (cost=4,175.94..211,156.46 rows=1 width=73) (actual time=24.856..378.336 rows=8,221 loops=1)

10. 7.244 354.785 ↓ 8,223.0 8,223 1

Nested Loop (cost=4,175.51..211,149.66 rows=1 width=61) (actual time=24.848..354.785 rows=8,223 loops=1)

  • Join Filter: (t_caso_1.id_caso_p = t_caso.id_caso)
  • Rows Removed by Join Filter: 3332
11. 36.551 331.087 ↓ 95.7 8,227 1

Nested Loop (cost=4,175.09..210,523.56 rows=86 width=39) (actual time=24.837..331.087 rows=8,227 loops=1)

12. 79.709 161.668 ↓ 2.5 66,434 1

Hash Left Join (cost=4,174.66..13,705.82 rows=27,016 width=35) (actual time=24.756..161.668 rows=66,434 loops=1)

  • Hash Cond: (t_vetrino.id_vetrino = t_vetrino_test.id_vetrino)
  • Filter: (((t_colorazione.tp_colorazione)::text = 'S'::text) OR ((t_colorazione.tp_colorazione)::text = 'D'::text) OR ((t_colorazione.tp_colorazione)::text = 'R'::text) OR ((t_colorazione.t (...)
13. 27.564 64.067 ↓ 2.4 66,434 1

Hash Left Join (cost=1,729.91..10,803.94 rows=27,386 width=36) (actual time=6.828..64.067 rows=66,434 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))
14. 30.795 36.485 ↓ 2.4 66,434 1

Bitmap Heap Scan on t_vetrino (cost=1,727.88..10,499.90 rows=27,802 width=37) (actual time=6.794..36.485 rows=66,434 loops=1)

  • Recheck Cond: (user_consegna = 0)
  • Filter: ((dt_cancel IS NULL) AND (annullato IS NULL) AND (user_taglio = 0))
  • Rows Removed by Filter: 26233
15. 5.690 5.690 ↑ 1.0 92,667 1

Bitmap Index Scan on i_vetrino1 (cost=0.00..1,720.93 rows=92,868 width=0) (actual time=5.690..5.690 rows=92,667 loops=1)

  • Index Cond: (user_consegna = 0)
16. 0.007 0.018 ↑ 1.0 38 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
17. 0.011 0.011 ↑ 1.0 38 1

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

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 17
18. 8.934 17.892 ↑ 1.0 68,700 1

Hash (cost=1,586.00..1,586.00 rows=68,700 width=7) (actual time=17.892..17.892 rows=68,700 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 2684kB
19. 8.958 8.958 ↑ 1.0 68,700 1

Seq Scan on t_vetrino_test (cost=0.00..1,586.00 rows=68,700 width=7) (actual time=0.004..8.958 rows=68,700 loops=1)

20. 132.868 132.868 ↓ 0.0 0 66,434

Index Scan using p_t_caso on t_caso t_caso_1 (cost=0.43..7.28 rows=1 width=12) (actual time=0.002..0.002 rows=0 loops=66,434)

  • 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
21. 16.454 16.454 ↑ 1.0 1 8,227

Index Scan using t_caso2 on t_caso (cost=0.43..7.27 rows=1 width=34) (actual time=0.002..0.002 rows=1 loops=8,227)

  • Index Cond: (id_acc_mat = t_vetrino.id_acc_mat)
  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 0
22. 16.446 16.446 ↑ 1.0 1 8,223

Index Scan using p_t_paziente on t_paziente (cost=0.42..6.79 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=8,223)

  • Index Cond: (id_paziente = t_caso_1.id_paziente)
  • Filter: (dt_cancel IS NULL)
23. 16.442 16.442 ↑ 1.0 14 8,221

Seq Scan on t_tp_accesso (cost=0.00..1.21 rows=14 width=5) (actual time=0.001..0.002 rows=14 loops=8,221)

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 7
24. 24.663 24.663 ↑ 1.0 1 8,221

Index Scan using p_t_blocchetto on t_blocchetto b (cost=0.42..6.51 rows=1 width=14) (actual time=0.002..0.003 rows=1 loops=8,221)

  • Index Cond: (id_blocchetto = t_vetrino.id_blocchetto)
  • Filter: ((dt_cancel IS NULL) AND ((tp_blocchetto)::text <> 'P'::text))
  • Rows Removed by Filter: 0
25. 15.608 15.608 ↑ 1.0 1 7,804

Index Scan using p_t_prelievo on t_prelievo (cost=0.43..6.51 rows=1 width=10) (actual time=0.002..0.002 rows=1 loops=7,804)

  • Index Cond: (id_prelievo = b.id_prelievo)
  • Filter: ((dt_cancel IS NULL) AND ((cd_prelievo)::text <> '-'::text))
26. 15.608 15.608 ↑ 1.0 1 7,804

Index Scan using p_t_campionamento on t_campionamento c (cost=0.43..6.52 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=7,804)

  • Index Cond: (b.id_campionamento = id_campionamento)
Total runtime : 514.530 ms