explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yvUi

Settings
# exclusive inclusive rows x rows loops node
1. 3.297 2,259.924 ↓ 919.0 919 1

HashAggregate (cost=64,120.81..64,120.82 rows=1 width=74) (actual time=2,259.587..2,259.924 rows=919 loops=1)

2. 0.293 2,256.627 ↓ 1,915.0 1,915 1

Nested Loop (cost=51,876.22..64,120.76 rows=1 width=74) (actual time=586.656..2,256.627 rows=1,915 loops=1)

3. 7.869 2,217.994 ↓ 1,917.0 1,917 1

Nested Loop (cost=51,875.79..64,115.14 rows=1 width=62) (actual time=586.629..2,217.994 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. 8.234 2,206.291 ↓ 1,917.0 1,917 1

Nested Loop (cost=51,875.79..64,113.76 rows=1 width=60) (actual time=586.611..2,206.291 rows=1,917 loops=1)

  • Join Filter: ((b.id_acc_mat = t_caso.id_acc_mat) AND (((t_caso.fl_stato)::text <> ALL ('{I,P,V,R,Z,F}'::text[])) OR ((b.splittato)::text = 'S'::text)))
  • Rows Removed by Join Filter: 4956
5. 1.389 1,806.296 ↓ 6,873.0 6,873 1

Nested Loop Left Join (cost=51,875.37..64,108.69 rows=1 width=42) (actual time=586.266..1,806.296 rows=6,873 loops=1)

  • Filter: (c.dt_cancel IS NULL)
  • Rows Removed by Filter: 1
6. 12.874 698.193 ↓ 6,874.0 6,874 1

Hash Join (cost=51,874.94..64,103.52 rows=1 width=30) (actual time=586.214..698.193 rows=6,874 loops=1)

  • Hash Cond: ((b.id_acc_mat = t_prelievo.id_acc_mat) AND (b.id_prelievo = t_prelievo.id_prelievo))
7. 99.463 99.463 ↑ 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.031..99.463 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_blocchetto (...)
  • Rows Removed by Filter: 252695
8. 261.739 585.856 ↑ 1.0 1,163,610 1

Hash (cost=34,418.00..34,418.00 rows=1,163,796 width=14) (actual time=585.856..585.856 rows=1,163,610 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 54523kB
9. 324.117 324.117 ↑ 1.0 1,163,610 1

Seq Scan on t_prelievo (cost=0.00..34,418.00 rows=1,163,796 width=14) (actual time=0.017..324.117 rows=1,163,610 loops=1)

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 9690
10. 1,106.714 1,106.714 ↑ 1.0 1 6,874

Index Scan using p_t_campionamento on t_campionamento c (cost=0.43..5.16 rows=1 width=24) (actual time=0.160..0.161 rows=1 loops=6,874)

  • Index Cond: (b.id_campionamento = id_campionamento)
11. 391.761 391.761 ↑ 1.0 1 6,873

Index Scan using t_caso2 on t_caso (cost=0.43..5.04 rows=1 width=40) (actual time=0.057..0.057 rows=1 loops=6,873)

  • Index Cond: (id_acc_mat = t_prelievo.id_acc_mat)
  • Filter: ((dt_cancel IS NULL) AND (id_caso_p = id_caso))
  • 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. 38.340 38.340 ↑ 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.020..0.020 rows=1 loops=1,917)

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