explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QOZF

Settings
# exclusive inclusive rows x rows loops node
1. 0.220 1,879.288 ↓ 691.0 691 1

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

2. 0.051 1,879.068 ↓ 919.0 919 1

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

3. 2.895 1,879.017 ↓ 919.0 919 1

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

4. 0.901 1,876.122 ↓ 1,915.0 1,915 1

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

5. 7.229 1,871.387 ↓ 1,917.0 1,917 1

Nested Loop (cost=11,352.80..261,133.75 rows=1 width=66) (actual time=325.835..1,871.387 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.060 1,860.324 ↓ 1,917.0 1,917 1

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

7. 0.408 1,856.428 ↓ 1,918.0 1,918 1

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

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

Hash Join (cost=11,351.94..261,122.04 rows=1 width=50) (actual time=325.797..1,852.184 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,525.635 1,525.635 ↓ 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.040..1,525.635 rows=1,738,800 loops=1)

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

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

  • Buckets: 8192 Batches: 1 Memory Usage: 349kB
11. 74.096 74.096 ↑ 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..74.096 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,879.617 ms