explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OfZZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.169 302.924 ↓ 1,944.0 1,944 1

Subquery Scan on v_no_ass3 (cost=172,804.80..172,804.82 rows=1 width=107) (actual time=302.016..302.924 rows=1,944 loops=1)

2. 8.443 302.755 ↓ 1,944.0 1,944 1

HashAggregate (cost=172,804.80..172,804.81 rows=1 width=95) (actual time=302.015..302.755 rows=1,944 loops=1)

3. 1.876 294.312 ↓ 5,158.0 5,158 1

Nested Loop Left Join (cost=7,350.81..172,804.74 rows=1 width=95) (actual time=37.115..294.312 rows=5,158 loops=1)

  • Filter: (c.dt_cancel IS NULL)
4. 2.523 282.120 ↓ 5,158.0 5,158 1

Nested Loop (cost=7,350.38..172,798.23 rows=1 width=83) (actual time=37.107..282.120 rows=5,158 loops=1)

5. 4.174 269.281 ↓ 5,158.0 5,158 1

Nested Loop (cost=7,349.95..172,791.72 rows=1 width=81) (actual time=37.098..269.281 rows=5,158 loops=1)

6. 21.371 254.229 ↓ 5,439.0 5,439 1

Nested Loop (cost=7,349.53..172,785.23 rows=1 width=75) (actual time=37.088..254.229 rows=5,439 loops=1)

  • Join Filter: ((t_caso.tp_accesso)::text = (t_tp_accesso.tp_accesso)::text)
  • Rows Removed by Join Filter: 65268
7. 3.863 221.980 ↓ 5,439.0 5,439 1

Nested Loop (cost=7,349.53..172,783.87 rows=1 width=73) (actual time=37.068..221.980 rows=5,439 loops=1)

8. 3.583 207.171 ↓ 5,473.0 5,473 1

Nested Loop (cost=7,349.11..172,776.96 rows=1 width=61) (actual time=37.061..207.171 rows=5,473 loops=1)

  • Join Filter: (t_caso_1.id_caso_p = t_caso.id_caso)
  • Rows Removed by Join Filter: 2807
9. 20.408 192.634 ↓ 101.4 5,477 1

Nested Loop (cost=7,348.68..172,381.97 rows=54 width=39) (actual time=37.053..192.634 rows=5,477 loops=1)

10. 11.720 82.714 ↓ 2.0 44,756 1

Hash Left Join (cost=7,348.26..8,973.65 rows=22,322 width=35) (actual time=37.037..82.714 rows=44,756 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. 32.055 70.979 ↓ 2.0 44,756 1

Hash Right Join (cost=7,346.23..8,716.89 rows=22,679 width=36) (actual time=37.007..70.979 rows=44,756 loops=1)

  • Hash Cond: (t_vetrino_test.id_vetrino = t_vetrino.id_vetrino)
12. 1.937 1.937 ↑ 1.0 29,919 1

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

13. 7.243 36.987 ↓ 2.0 44,755 1

Hash (cost=7,062.74..7,062.74 rows=22,679 width=37) (actual time=36.987..36.987 rows=44,755 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 2296kB
14. 25.735 29.744 ↓ 2.0 44,755 1

Bitmap Heap Scan on t_vetrino (cost=1,589.97..7,062.74 rows=22,679 width=37) (actual time=4.511..29.744 rows=44,755 loops=1)

  • Recheck Cond: (user_taglio = 0)
  • Filter: ((dt_cancel IS NULL) AND (annullato IS NULL) AND (user_consegna = 0))
  • Rows Removed by Filter: 41466
15. 4.009 4.009 ↓ 1.0 86,221 1

Bitmap Index Scan on i_ppppp (cost=0.00..1,584.31 rows=85,318 width=0) (actual time=4.009..4.009 rows=86,221 loops=1)

  • Index Cond: (user_taglio = 0)
16. 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
17. 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.004..0.009 rows=38 loops=1)

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 17
18. 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.31 rows=1 width=12) (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
19. 10.954 10.954 ↓ 2.0 2 5,477

Index Scan using t_caso2 on t_caso (cost=0.43..7.30 rows=1 width=34) (actual time=0.002..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
20. 10.946 10.946 ↑ 1.0 1 5,473

Index Scan using p_t_paziente on t_paziente (cost=0.42..6.90 rows=1 width=20) (actual time=0.002..0.002 rows=1 loops=5,473)

  • Index Cond: (id_paziente = t_caso_1.id_paziente)
  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 0
21. 10.878 10.878 ↑ 1.0 13 5,439

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

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 6
22. 10.878 10.878 ↑ 1.0 1 5,439

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

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

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

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

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

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