explain.depesz.com

PostgreSQL's explain analyze made readable

Result: naMA

Settings
# exclusive inclusive rows x rows loops node
1. 0.213 2,004.190 ↓ 691.0 691 1

HashAggregate (cost=258,616.88..258,616.89 rows=1 width=4) (actual time=2,004.142..2,004.190 rows=691 loops=1)

2. 0.056 2,003.977 ↓ 919.0 919 1

Subquery Scan on v_no_ass2 (cost=258,616.86..258,616.88 rows=1 width=4) (actual time=2,003.563..2,003.977 rows=919 loops=1)

3. 3.252 2,003.921 ↓ 919.0 919 1

HashAggregate (cost=258,616.86..258,616.87 rows=1 width=78) (actual time=2,003.562..2,003.921 rows=919 loops=1)

4. 0.706 2,000.669 ↓ 1,915.0 1,915 1

Nested Loop (cost=8,830.65..258,616.81 rows=1 width=78) (actual time=344.834..2,000.669 rows=1,915 loops=1)

5. 8.568 1,988.461 ↓ 1,917.0 1,917 1

Nested Loop (cost=8,830.23..258,611.19 rows=1 width=66) (actual time=344.791..1,988.461 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.833 1,976.059 ↓ 1,917.0 1,917 1

Nested Loop (cost=8,830.23..258,609.80 rows=1 width=64) (actual time=344.774..1,976.059 rows=1,917 loops=1)

7. 0.223 1,969.472 ↓ 1,918.0 1,918 1

Nested Loop Left Join (cost=8,829.80..258,604.65 rows=1 width=62) (actual time=344.730..1,969.472 rows=1,918 loops=1)

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

Hash Join (cost=8,829.38..258,599.48 rows=1 width=50) (actual time=344.691..1,963.495 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,639.752 1,639.752 ↓ 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.020..1,639.752 rows=1,738,800 loops=1)

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

Hash (cost=8,098.85..8,098.85 rows=58,442 width=28) (actual time=59.676..59.676 rows=6,879 loops=1)

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

Bitmap Heap Scan on t_blocchetto b (cost=1,506.74..8,098.85 rows=58,442 width=28) (actual time=5.821..57.629 rows=6,879 loops=1)

  • Recheck Cond: (user_inclusione = 0)
  • 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 ((tp_blocchetto IS NULL (...)
  • Rows Removed by Filter: 73296
12. 5.214 5.214 ↑ 1.0 80,175 1

Bitmap Index Scan on i_blocchetto1 (cost=0.00..1,492.13 rows=80,494 width=0) (actual time=5.214..5.214 rows=80,175 loops=1)

  • Index Cond: (user_inclusione = 0)
13. 5.754 5.754 ↑ 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.003 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. 11.502 11.502 ↑ 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.006..0.006 rows=1 loops=1,917)

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