explain.depesz.com

PostgreSQL's explain analyze made readable

Result: S2Kx

Settings
# exclusive inclusive rows x rows loops node
1. 0.235 1,939.610 ↓ 691.0 691 1

HashAggregate (cost=261,139.44..261,139.45 rows=1 width=4) (actual time=1,939.561..1,939.610 rows=691 loops=1)

2. 0.054 1,939.375 ↓ 919.0 919 1

Subquery Scan on v_no_ass2 (cost=261,139.42..261,139.44 rows=1 width=4) (actual time=1,938.931..1,939.375 rows=919 loops=1)

3. 2.993 1,939.321 ↓ 919.0 919 1

HashAggregate (cost=261,139.42..261,139.43 rows=1 width=78) (actual time=1,938.929..1,939.321 rows=919 loops=1)

4. 1.152 1,936.328 ↓ 1,915.0 1,915 1

Nested Loop (cost=11,353.22..261,139.37 rows=1 width=78) (actual time=326.556..1,936.328 rows=1,915 loops=1)

5. 6.869 1,931.342 ↓ 1,917.0 1,917 1

Nested Loop (cost=11,352.80..261,133.75 rows=1 width=66) (actual time=326.546..1,931.342 rows=1,917 loops=1)

  • Join Filter: ((t_caso.tp_accesso)::text = (t_tp_accesso.tp_accesso)::text)
  • Rows Removed by Join Filter: 24921
6. 0.187 1,920.639 ↓ 1,917.0 1,917 1

Nested Loop (cost=11,352.80..261,132.37 rows=1 width=64) (actual time=326.526..1,920.639 rows=1,917 loops=1)

7. 0.427 1,916.616 ↓ 1,918.0 1,918 1

Nested Loop Left Join (cost=11,352.37..261,127.22 rows=1 width=62) (actual time=326.515..1,916.616 rows=1,918 loops=1)

  • Filter: (c.dt_cancel IS NULL)
8. 270.240 1,912.353 ↓ 1,918.0 1,918 1

Hash Join (cost=11,351.94..261,122.04 rows=1 width=50) (actual time=326.490..1,912.353 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
9. 1,573.354 1,573.354 ↓ 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.037..1,573.354 rows=1,738,800 loops=1)

  • Filter: ((dt_cancel IS NULL) AND (id_caso_p = id_caso))
  • Rows Removed by Filter: 11996
10. 1.583 68.759 ↑ 8.5 6,879 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 349kB
11. 67.176 67.176 ↑ 8.5 6,879 1

Seq Scan on t_blocchetto b (cost=0.00..10,621.42 rows=58,442 width=28) (actual time=0.018..67.176 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) A (...)
  • Rows Removed by Filter: 252695
12. 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)
13. 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
14. 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
15. 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,939.945 ms