explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JRQH

Settings
# exclusive inclusive rows x rows loops node
1. 0.203 393.799 ↓ 1,943.0 1,943 1

Subquery Scan on v_no_ass3 (cost=167,675.81..167,675.83 rows=1 width=107) (actual time=392.720..393.799 rows=1,943 loops=1)

2. 9.314 393.596 ↓ 1,943.0 1,943 1

HashAggregate (cost=167,675.81..167,675.82 rows=1 width=99) (actual time=392.719..393.596 rows=1,943 loops=1)

3. 5.083 384.282 ↓ 5,157.0 5,157 1

Nested Loop Left Join (cost=6,767.77..167,675.75 rows=1 width=99) (actual time=43.558..384.282 rows=5,157 loops=1)

  • Filter: (c.dt_cancel IS NULL)
4. 2.805 368.885 ↓ 5,157.0 5,157 1

Nested Loop (cost=6,767.35..167,669.24 rows=1 width=87) (actual time=43.550..368.885 rows=5,157 loops=1)

5. 1.884 350.609 ↓ 5,157.0 5,157 1

Nested Loop (cost=6,766.92..167,662.73 rows=1 width=85) (actual time=43.540..350.609 rows=5,157 loops=1)

6. 21.229 332.411 ↓ 5,438.0 5,438 1

Nested Loop (cost=6,766.50..167,656.24 rows=1 width=79) (actual time=43.518..332.411 rows=5,438 loops=1)

  • Join Filter: ((t_caso.tp_accesso)::text = (t_tp_accesso.tp_accesso)::text)
  • Rows Removed by Join Filter: 65256
7. 4.996 300.306 ↓ 5,438.0 5,438 1

Nested Loop (cost=6,766.50..167,654.89 rows=1 width=77) (actual time=43.505..300.306 rows=5,438 loops=1)

8. 6.401 262.478 ↓ 5,472.0 5,472 1

Nested Loop (cost=6,766.08..167,647.77 rows=1 width=65) (actual time=43.433..262.478 rows=5,472 loops=1)

  • Join Filter: (t_caso_1.id_caso_p = t_caso.id_caso)
  • Rows Removed by Join Filter: 2806
9. 19.450 245.125 ↓ 161.1 5,476 1

Nested Loop (cost=6,765.65..167,398.93 rows=34 width=43) (actual time=43.425..245.125 rows=5,476 loops=1)

10. 41.494 91.410 ↓ 2.1 44,755 1

Hash Right Join (cost=6,765.22..8,137.16 rows=21,744 width=39) (actual time=43.407..91.410 rows=44,755 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_colorazione.tp_colorazion (...)
  • Rows Removed by Filter: 1
11. 6.537 6.537 ↓ 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..6.537 rows=29,919 loops=1)

12. 7.793 43.379 ↓ 2.0 44,755 1

Hash (cost=6,491.22..6,491.22 rows=21,920 width=40) (actual time=43.379..43.379 rows=44,755 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 2726kB
13. 14.112 35.586 ↓ 2.0 44,755 1

Hash Left Join (cost=1,136.27..6,491.22 rows=21,920 width=40) (actual time=5.090..35.586 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))
14. 16.958 21.455 ↓ 2.0 44,755 1

Bitmap Heap Scan on t_vetrino (cost=1,134.25..6,239.77 rows=22,269 width=41) (actual time=5.057..21.455 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
15. 4.497 4.497 ↓ 1.0 61,899 1

Bitmap Index Scan on i_vetrino1 (cost=0.00..1,128.68 rows=60,835 width=0) (actual time=4.497..4.497 rows=61,899 loops=1)

  • Index Cond: (user_consegna = 0)
16. 0.008 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.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. 134.265 134.265 ↓ 0.0 0 44,755

Index Scan using p_t_caso on t_caso t_caso_1 (cost=0.43..7.31 rows=1 width=12) (actual time=0.003..0.003 rows=0 loops=44,755)

  • 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.952 10.952 ↓ 2.0 2 5,476

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

  • Index Cond: (id_acc_mat = t_vetrino.id_acc_mat)
  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 0
20. 32.832 32.832 ↑ 1.0 1 5,472

Index Scan using p_t_paziente on t_paziente (cost=0.42..7.11 rows=1 width=20) (actual time=0.006..0.006 rows=1 loops=5,472)

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

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,438)

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

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

  • 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. 15.471 15.471 ↑ 1.0 1 5,157

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

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

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,157)

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