explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kfa1

Settings
# exclusive inclusive rows x rows loops node
1. 3.259 1,921.651 ↓ 919.0 919 1

HashAggregate (cost=261,139.42..261,139.43 rows=1 width=74) (actual time=1,920.924..1,921.651 rows=919 loops=1)

2. 1.157 1,918.392 ↓ 1,915.0 1,915 1

Nested Loop (cost=11,353.22..261,139.37 rows=1 width=74) (actual time=327.558..1,918.392 rows=1,915 loops=1)

3. 7.535 1,913.401 ↓ 1,917.0 1,917 1

Nested Loop (cost=11,352.80..261,133.75 rows=1 width=62) (actual time=327.548..1,913.401 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. 0.420 1,902.032 ↓ 1,917.0 1,917 1

Nested Loop (cost=11,352.80..261,132.37 rows=1 width=60) (actual time=327.534..1,902.032 rows=1,917 loops=1)

5. 0.621 1,895.858 ↓ 1,918.0 1,918 1

Nested Loop Left Join (cost=11,352.37..261,127.22 rows=1 width=58) (actual time=327.495..1,895.858 rows=1,918 loops=1)

  • Filter: (c.dt_cancel IS NULL)
6. 262.290 1,891.401 ↓ 1,918.0 1,918 1

Hash Join (cost=11,351.94..261,122.04 rows=1 width=46) (actual time=327.479..1,891.401 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
7. 1,555.852 1,555.852 ↓ 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.022..1,555.852 rows=1,738,800 loops=1)

  • Filter: ((dt_cancel IS NULL) AND (id_caso_p = id_caso))
  • Rows Removed by Filter: 11996
8. 1.871 73.259 ↑ 8.5 6,879 1

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

  • Buckets: 8192 Batches: 1 Memory Usage: 323kB
9. 71.388 71.388 ↑ 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.018..71.388 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_bloc (...)
  • Rows Removed by Filter: 252695
10. 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)
11. 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
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. 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,922.007 ms