explain.depesz.com

PostgreSQL's explain analyze made readable

Result: msBl

Settings
# exclusive inclusive rows x rows loops node
1. 0.383 1,870.632 ↓ 3,301.0 3,301 1

Unique (cost=277,057.56..277,057.57 rows=1 width=4) (actual time=1,869.957..1,870.632 rows=3,301 loops=1)

2. 1.107 1,870.249 ↓ 3,754.0 3,754 1

Sort (cost=277,057.56..277,057.56 rows=1 width=4) (actual time=1,869.955..1,870.249 rows=3,754 loops=1)

  • Sort Key: v_no_ass5.id_caso
  • Sort Method: quicksort Memory: 272kB
3. 0.209 1,869.142 ↓ 3,754.0 3,754 1

Subquery Scan on v_no_ass5 (cost=277,057.53..277,057.55 rows=1 width=4) (actual time=1,867.386..1,869.142 rows=3,754 loops=1)

4. 19.440 1,868.933 ↓ 3,754.0 3,754 1

HashAggregate (cost=277,057.53..277,057.54 rows=1 width=99) (actual time=1,867.385..1,868.933 rows=3,754 loops=1)

5. 4.868 1,849.493 ↓ 10,717.0 10,717 1

Nested Loop Left Join (cost=16,004.34..277,057.47 rows=1 width=99) (actual time=383.039..1,849.493 rows=10,717 loops=1)

  • Filter: (c.dt_cancel IS NULL)
6. 6.810 1,823.191 ↓ 10,717.0 10,717 1

Nested Loop (cost=16,003.91..277,050.94 rows=1 width=87) (actual time=383.031..1,823.191 rows=10,717 loops=1)

7. 10.042 1,794.947 ↓ 10,717.0 10,717 1

Nested Loop (cost=16,003.48..277,044.42 rows=1 width=85) (actual time=383.022..1,794.947 rows=10,717 loops=1)

8. 43.037 1,762.625 ↓ 11,140.0 11,140 1

Nested Loop (cost=16,003.06..277,037.92 rows=1 width=79) (actual time=383.013..1,762.625 rows=11,140 loops=1)

  • Join Filter: ((t_caso.tp_accesso)::text = (t_tp_accesso.tp_accesso)::text)
  • Rows Removed by Join Filter: 144820
9. 7.914 1,686.168 ↓ 11,140.0 11,140 1

Nested Loop (cost=16,003.06..277,036.54 rows=1 width=77) (actual time=382.999..1,686.168 rows=11,140 loops=1)

10. 11.830 1,655.970 ↓ 11,142.0 11,142 1

Nested Loop (cost=16,002.64..277,029.74 rows=1 width=65) (actual time=382.991..1,655.970 rows=11,142 loops=1)

  • Join Filter: (t_caso_1.id_caso_p = t_caso.id_caso)
  • Rows Removed by Join Filter: 6167
11. 10.867 1,621.848 ↓ 40.1 11,146 1

Hash Join (cost=16,002.21..275,121.63 rows=278 width=43) (actual time=382.972..1,621.848 rows=11,146 loops=1)

  • Hash Cond: (t_caso_1.id_caso = t_vetrino.id_caso)
12. 1,440.398 1,440.398 ↓ 1.3 7,450 1

Seq Scan on t_caso t_caso_1 (cost=0.00..257,163.63 rows=5,600 width=12) (actual time=212.083..1,440.398 rows=7,450 loops=1)

  • Filter: ((dt_cancel IS NULL) AND ((fl_stato)::text <> ALL ('{I,P,V,R,Z,F}'::text[])))
  • Rows Removed by Filter: 1743346
13. 16.572 170.583 ↑ 1.1 78,140 1

Hash (cost=14,915.40..14,915.40 rows=86,945 width=39) (actual time=170.583..170.583 rows=78,140 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 4523kB
14. 67.545 154.011 ↑ 1.1 78,140 1

Hash Right Join (cost=12,358.77..14,915.40 rows=86,945 width=39) (actual time=80.973..154.011 rows=78,140 loops=1)

  • Hash Cond: (t_vetrino_test.id_vetrino = t_vetrino.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_coloraz (...)
15. 5.574 5.574 ↑ 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.006..5.574 rows=68,700 loops=1)

16. 19.550 80.892 ↑ 1.1 78,140 1

Hash (cost=11,257.11..11,257.11 rows=88,133 width=40) (actual time=80.892..80.892 rows=78,140 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 4759kB
17. 32.490 61.342 ↑ 1.1 78,140 1

Hash Left Join (cost=1,745.33..11,257.11 rows=88,133 width=40) (actual time=7.161..61.342 rows=78,140 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))
18. 22.913 28.828 ↑ 1.1 78,140 1

Bitmap Heap Scan on t_vetrino (cost=1,743.30..10,283.15 rows=89,473 width=41) (actual time=7.110..28.828 rows=78,140 loops=1)

  • Recheck Cond: (user_consegna = 0)
  • Filter: ((dt_cancel IS NULL) AND (annullato IS NULL))
  • Rows Removed by Filter: 14527
19. 5.915 5.915 ↑ 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.915..5.915 rows=92,667 loops=1)

  • Index Cond: (user_consegna = 0)
20. 0.008 0.024 ↑ 1.0 38 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
21. 0.016 0.016 ↑ 1.0 38 1

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

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 17
22. 22.292 22.292 ↓ 2.0 2 11,146

Index Scan using t_caso2 on t_caso (cost=0.43..6.85 rows=1 width=34) (actual time=0.002..0.002 rows=2 loops=11,146)

  • Index Cond: (id_acc_mat = t_vetrino.id_acc_mat)
  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 0
23. 22.284 22.284 ↑ 1.0 1 11,142

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=11,142)

  • Index Cond: (id_paziente = t_caso_1.id_paziente)
  • Filter: (dt_cancel IS NULL)
24. 33.420 33.420 ↑ 1.0 14 11,140

Seq Scan on t_tp_accesso (cost=0.00..1.21 rows=14 width=5) (actual time=0.001..0.003 rows=14 loops=11,140)

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 7
25. 22.280 22.280 ↑ 1.0 1 11,140

Index Scan using p_t_blocchetto on t_blocchetto b (cost=0.42..6.49 rows=1 width=14) (actual time=0.002..0.002 rows=1 loops=11,140)

  • Index Cond: (id_blocchetto = t_vetrino.id_blocchetto)
  • Filter: ((dt_cancel IS NULL) AND ((tp_blocchetto)::text <> 'P'::text))
  • Rows Removed by Filter: 0
26. 21.434 21.434 ↑ 1.0 1 10,717

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=10,717)

  • Index Cond: (id_prelievo = b.id_prelievo)
  • Filter: ((dt_cancel IS NULL) AND ((cd_prelievo)::text <> '-'::text))
27. 21.434 21.434 ↑ 1.0 1 10,717

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=10,717)

  • Index Cond: (b.id_campionamento = id_campionamento)
Total runtime : 1,872.965 ms