explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Fu8s

Settings
# exclusive inclusive rows x rows loops node
1. 0.331 497.699 ↓ 2,783.0 2,783 1

Unique (cost=211,177.50..211,177.50 rows=1 width=4) (actual time=497.137..497.699 rows=2,783 loops=1)

2. 0.962 497.368 ↓ 3,080.0 3,080 1

Sort (cost=211,177.50..211,177.50 rows=1 width=4) (actual time=497.134..497.368 rows=3,080 loops=1)

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

Subquery Scan on v_no_ass3 (cost=211,177.47..211,177.49 rows=1 width=4) (actual time=494.363..496.406 rows=3,080 loops=1)

4. 14.697 496.215 ↓ 3,080.0 3,080 1

HashAggregate (cost=211,177.47..211,177.48 rows=1 width=99) (actual time=494.362..496.215 rows=3,080 loops=1)

5. 3.795 481.518 ↓ 7,804.0 7,804 1

Nested Loop Left Join (cost=4,177.21..211,177.41 rows=1 width=99) (actual time=27.296..481.518 rows=7,804 loops=1)

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

Nested Loop (cost=4,176.78..211,170.88 rows=1 width=87) (actual time=27.287..462.115 rows=7,804 loops=1)

7. 7.123 442.176 ↓ 7,804.0 7,804 1

Nested Loop (cost=4,176.36..211,164.36 rows=1 width=85) (actual time=27.277..442.176 rows=7,804 loops=1)

8. 33.575 418.611 ↓ 8,221.0 8,221 1

Nested Loop (cost=4,175.94..211,157.84 rows=1 width=79) (actual time=27.222..418.611 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. 6.385 368.594 ↓ 8,221.0 8,221 1

Nested Loop (cost=4,175.94..211,156.46 rows=1 width=77) (actual time=27.206..368.594 rows=8,221 loops=1)

10. 6.379 345.763 ↓ 8,223.0 8,223 1

Nested Loop (cost=4,175.51..211,149.66 rows=1 width=65) (actual time=27.189..345.763 rows=8,223 loops=1)

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

Nested Loop (cost=4,175.09..210,523.56 rows=86 width=43) (actual time=27.179..322.930 rows=8,227 loops=1)

12. 78.454 161.132 ↓ 2.5 66,434 1

Hash Left Join (cost=4,174.66..13,705.82 rows=27,016 width=39) (actual time=27.086..161.132 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. 26.982 63.274 ↓ 2.4 66,434 1

Hash Left Join (cost=1,729.91..10,803.94 rows=27,386 width=40) (actual time=7.641..63.274 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. 29.854 36.273 ↓ 2.4 66,434 1

Bitmap Heap Scan on t_vetrino (cost=1,727.88..10,499.90 rows=27,802 width=41) (actual time=7.608..36.273 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. 6.419 6.419 ↑ 1.0 92,667 1

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

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

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

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

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

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

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

  • Buckets: 8192 Batches: 1 Memory Usage: 2684kB
19. 9.814 9.814 ↑ 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..9.814 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. 16.442 16.442 ↑ 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.002 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 : 498.788 ms