explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7CRU

Settings
# exclusive inclusive rows x rows loops node
1. 9.027 311.664 ↓ 1,944.0 1,944 1

HashAggregate (cost=172,676.19..172,676.20 rows=1 width=99) (actual time=310.862..311.664 rows=1,944 loops=1)

2. 2.062 302.637 ↓ 5,158.0 5,158 1

Nested Loop Left Join (cost=6,816.39..172,676.13 rows=1 width=99) (actual time=42.540..302.637 rows=5,158 loops=1)

  • Filter: (c.dt_cancel IS NULL)
3. 2.660 290.259 ↓ 5,158.0 5,158 1

Nested Loop (cost=6,815.96..172,669.61 rows=1 width=87) (actual time=42.532..290.259 rows=5,158 loops=1)

4. 4.609 277.283 ↓ 5,158.0 5,158 1

Nested Loop (cost=6,815.53..172,663.10 rows=1 width=85) (actual time=42.524..277.283 rows=5,158 loops=1)

5. 20.992 261.796 ↓ 5,439.0 5,439 1

Nested Loop (cost=6,815.11..172,656.61 rows=1 width=79) (actual time=42.514..261.796 rows=5,439 loops=1)

  • Join Filter: ((t_caso.tp_accesso)::text = (t_tp_accesso.tp_accesso)::text)
  • Rows Removed by Join Filter: 65268
6. 3.965 229.926 ↓ 5,439.0 5,439 1

Nested Loop (cost=6,815.11..172,655.26 rows=1 width=77) (actual time=42.494..229.926 rows=5,439 loops=1)

7. 3.419 215.015 ↓ 5,473.0 5,473 1

Nested Loop (cost=6,814.69..172,648.14 rows=1 width=65) (actual time=42.486..215.015 rows=5,473 loops=1)

  • Join Filter: (t_caso_1.id_caso_p = t_caso.id_caso)
  • Rows Removed by Join Filter: 2807
8. 26.839 200.642 ↓ 156.5 5,477 1

Nested Loop (cost=6,814.26..172,392.16 rows=35 width=43) (actual time=42.477..200.642 rows=5,477 loops=1)

9. 39.775 84.291 ↓ 2.0 44,756 1

Hash Right Join (cost=6,813.83..8,146.27 rows=22,440 width=39) (actual time=42.460..84.291 rows=44,756 loops=1)

  • Hash Cond: (t_vetrino_test.id_vetrino = t_vetrino.id_vetrino)
10. 2.079 2.079 ↓ 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.004..2.079 rows=29,919 loops=1)

11. 8.081 42.437 ↓ 2.0 44,755 1

Hash (cost=6,533.33..6,533.33 rows=22,440 width=40) (actual time=42.437..42.437 rows=44,755 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 2726kB
12. 14.365 34.356 ↓ 2.0 44,755 1

Hash Left Join (cost=1,156.19..6,533.33 rows=22,440 width=40) (actual time=4.079..34.356 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))
13. 16.478 19.964 ↓ 2.0 44,755 1

Bitmap Heap Scan on t_vetrino (cost=1,154.17..6,275.26 rows=22,799 width=41) (actual time=4.039..19.964 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
14. 3.486 3.486 ↓ 1.0 61,876 1

Bitmap Index Scan on i_vetrino1 (cost=0.00..1,148.47 rows=61,873 width=0) (actual time=3.486..3.486 rows=61,876 loops=1)

  • Index Cond: (user_consegna = 0)
15. 0.007 0.027 ↑ 1.0 38 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
16. 0.020 0.020 ↑ 1.0 38 1

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

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 17
17. 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
18. 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
19. 10.946 10.946 ↑ 1.0 1 5,473

Index Scan using p_t_paziente on t_paziente (cost=0.42..7.11 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
20. 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
21. 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
22. 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))
23. 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 : 312.606 ms