explain.depesz.com

PostgreSQL's explain analyze made readable

Result: miph

Settings
# exclusive inclusive rows x rows loops node
1. 2.890 1,966.843 ↓ 919.0 919 1

HashAggregate (cost=261,139.42..261,139.43 rows=1 width=74) (actual time=1,966.485..1,966.843 rows=919 loops=1)

2. 1.007 1,963.953 ↓ 1,915.0 1,915 1

Nested Loop (cost=11,353.22..261,139.37 rows=1 width=74) (actual time=349.736..1,963.953 rows=1,915 loops=1)

3. 7.231 1,959.112 ↓ 1,917.0 1,917 1

Nested Loop (cost=11,352.80..261,133.75 rows=1 width=62) (actual time=349.727..1,959.112 rows=1,917 loops=1)

  • Join Filter: ((t_caso.tp_accesso)::text = (t_tp_accesso.tp_accesso)::text)
  • Rows Removed by Join Filter: 24921
4. 0.150 1,948.047 ↓ 1,917.0 1,917 1

Nested Loop (cost=11,352.80..261,132.37 rows=1 width=60) (actual time=349.714..1,948.047 rows=1,917 loops=1)

5. 0.612 1,944.061 ↓ 1,918.0 1,918 1

Nested Loop Left Join (cost=11,352.37..261,127.22 rows=1 width=58) (actual time=349.707..1,944.061 rows=1,918 loops=1)

  • Filter: (c.dt_cancel IS NULL)
6. 273.343 1,939.613 ↓ 1,918.0 1,918 1

Hash Join (cost=11,351.94..261,122.04 rows=1 width=46) (actual time=349.681..1,939.613 rows=1,918 loops=1)

  • Hash Cond: (t_caso.id_acc_mat = b.id_acc_mat)
  • Join Filter: (((t_caso.fl_stato)::text <> ALL ('{I,P,V,R,Z,F}'::text[])) OR ((b.splittato)::text = 'S'::text))
  • Rows Removed by Join Filter: 4961
7. 1,586.991 1,586.991 ↓ 198.7 1,738,800 1

Seq Scan on t_caso (cost=0.00..248,407.74 rows=8,751 width=40) (actual time=0.156..1,586.991 rows=1,738,800 loops=1)

  • Filter: ((dt_cancel IS NULL) AND (id_caso_p = id_caso))
  • Rows Removed by Filter: 11996
8. 2.003 79.279 ↑ 8.5 6,879 1

Hash (cost=10,621.42..10,621.42 rows=58,442 width=24) (actual time=79.279..79.279 rows=6,879 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 323kB
9. 77.276 77.276 ↑ 8.5 6,879 1

Seq Scan on t_blocchetto b (cost=0.00..10,621.42 rows=58,442 width=24) (actual time=0.037..77.276 rows=6,879 loops=1)

  • Filter: ((dt_cancel IS NULL) AND (((fl_estemporanea)::text <> 'S'::text) OR (fl_estemporanea IS NULL)) AND ((tp_inclusione IS NULL) OR ((tp_inclusione)::text <> 'O'::text)) AND (user_inclusione = 0) AND ((tp_bloc (...)
  • Rows Removed by Filter: 252695
10. 3.836 3.836 ↑ 1.0 1 1,918

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

  • Index Cond: (b.id_campionamento = id_campionamento)
11. 3.836 3.836 ↑ 1.0 1 1,918

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

  • Index Cond: (id_prelievo = b.id_prelievo)
  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 0
12. 3.834 3.834 ↑ 1.0 14 1,917

Seq Scan on t_tp_accesso (cost=0.00..1.21 rows=14 width=5) (actual time=0.001..0.002 rows=14 loops=1,917)

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 7
13. 3.834 3.834 ↑ 1.0 1 1,917

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

  • Index Cond: (id_paziente = t_caso.id_paziente)
  • Filter: (dt_cancel IS NULL)
Total runtime : 1,967.157 ms