explain.depesz.com

PostgreSQL's explain analyze made readable

Result: R5fM

Settings
# exclusive inclusive rows x rows loops node
1. 0.083 1,954.734 ↓ 691.0 691 1

Unique (cost=261,139.45..261,139.46 rows=1 width=4) (actual time=1,954.622..1,954.734 rows=691 loops=1)

2. 0.201 1,954.651 ↓ 919.0 919 1

Sort (cost=261,139.45..261,139.46 rows=1 width=4) (actual time=1,954.621..1,954.651 rows=919 loops=1)

  • Sort Key: v_no_ass2.id_caso
  • Sort Method: quicksort Memory: 68kB
3. 0.049 1,954.450 ↓ 919.0 919 1

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

4. 2.999 1,954.401 ↓ 919.0 919 1

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

5. 1.523 1,951.402 ↓ 1,915.0 1,915 1

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

6. 7.338 1,940.294 ↓ 1,917.0 1,917 1

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

  • Join Filter: ((t_caso.tp_accesso)::text = (t_tp_accesso.tp_accesso)::text)
  • Rows Removed by Join Filter: 24921
7. 0.158 1,929.122 ↓ 1,917.0 1,917 1

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

8. 1.509 1,923.210 ↓ 1,918.0 1,918 1

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

  • Filter: (c.dt_cancel IS NULL)
9. 257.112 1,917.865 ↓ 1,918.0 1,918 1

Hash Join (cost=11,351.94..261,122.04 rows=1 width=50) (actual time=351.263..1,917.865 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
10. 1,561.907 1,561.907 ↓ 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.016..1,561.907 rows=1,738,800 loops=1)

  • Filter: ((dt_cancel IS NULL) AND (id_caso_p = id_caso))
  • Rows Removed by Filter: 11996
11. 2.094 98.846 ↑ 8.5 6,879 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 349kB
12. 96.752 96.752 ↑ 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.025..96.752 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 (...)
  • Rows Removed by Filter: 252695
13. 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)
14. 5.754 5.754 ↑ 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.003..0.003 rows=1 loops=1,918)

  • Index Cond: (id_prelievo = b.id_prelievo)
  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 0
15. 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
16. 9.585 9.585 ↑ 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.005..0.005 rows=1 loops=1,917)

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