explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FtfV

Settings
# exclusive inclusive rows x rows loops node
1. 0.363 1,712.948 ↓ 2,783.0 2,783 1

Unique (cost=80,801.70..80,801.70 rows=1 width=4) (actual time=1,712.407..1,712.948 rows=2,783 loops=1)

2. 0.903 1,712.585 ↓ 3,080.0 3,080 1

Sort (cost=80,801.70..80,801.70 rows=1 width=4) (actual time=1,712.406..1,712.585 rows=3,080 loops=1)

  • Sort Key: v_no_ass3.id_caso
  • Sort Method: quicksort Memory: 241kB
3. 0.220 1,711.682 ↓ 3,080.0 3,080 1

Subquery Scan on v_no_ass3 (cost=80,801.67..80,801.69 rows=1 width=4) (actual time=1,710.077..1,711.682 rows=3,080 loops=1)

4. 15.072 1,711.462 ↓ 3,080.0 3,080 1

HashAggregate (cost=80,801.67..80,801.68 rows=1 width=95) (actual time=1,710.076..1,711.462 rows=3,080 loops=1)

5. 38.277 1,696.390 ↓ 7,804.0 7,804 1

Nested Loop (cost=69,996.48..80,801.61 rows=1 width=95) (actual time=811.133..1,696.390 rows=7,804 loops=1)

  • Join Filter: ((t_caso.tp_accesso)::text = (t_tp_accesso.tp_accesso)::text)
  • Rows Removed by Join Filter: 101452
6. 0.150 1,642.505 ↓ 7,804.0 7,804 1

Nested Loop (cost=69,996.48..80,800.22 rows=1 width=93) (actual time=811.114..1,642.505 rows=7,804 loops=1)

7. 12.128 1,618.937 ↓ 7,806.0 7,806 1

Nested Loop (cost=69,996.05..80,793.73 rows=1 width=81) (actual time=811.107..1,618.937 rows=7,806 loops=1)

  • Join Filter: (t_vetrino.id_caso = t_caso_1.id_caso)
  • Rows Removed by Join Filter: 1371
8. 12.684 1,460.901 ↓ 72,954.0 72,954 1

Nested Loop Left Join (cost=69,995.63..80,787.19 rows=1 width=85) (actual time=810.881..1,460.901 rows=72,954 loops=1)

  • Filter: (c.dt_cancel IS NULL)
  • Rows Removed by Filter: 1
9. 64.708 1,302.307 ↓ 72,955.0 72,955 1

Nested Loop (cost=69,995.20..80,780.66 rows=1 width=73) (actual time=810.871..1,302.307 rows=72,955 loops=1)

  • Join Filter: (t_vetrino.id_acc_mat = t_caso.id_acc_mat)
10. 90.540 1,117.469 ↓ 60,065.0 60,065 1

Hash Join (cost=69,994.77..80,774.12 rows=1 width=47) (actual time=810.855..1,117.469 rows=60,065 loops=1)

  • Hash Cond: ((t_vetrino.id_acc_mat = t_prelievo.id_acc_mat) AND (b.id_prelievo = t_prelievo.id_prelievo))
11. 75.885 367.091 ↓ 2.4 60,073 1

Hash Join (cost=15,224.55..25,311.44 rows=25,180 width=41) (actual time=150.680..367.091 rows=60,073 loops=1)

  • Hash Cond: (t_vetrino.id_blocchetto = b.id_blocchetto)
12. 81.364 168.362 ↓ 2.5 66,434 1

Hash Left Join (cost=4,174.66..13,705.82 rows=27,016 width=35) (actual time=27.665..168.362 rows=66,434 loops=1)

  • Hash Cond: (t_vetrino.id_vetrino = t_vetrino_test.id_vetrino)
  • Filter: (((t_colorazione.tp_colorazione)::text = 'S'::text) OR ((t_colorazione.tp_colorazione)::text = 'D'::text) OR ((t_colorazione.tp_colorazione)::text = 'R'::text) OR ((t_colorazione.t (...)
13. 28.883 65.767 ↓ 2.4 66,434 1

Hash Left Join (cost=1,729.91..10,803.94 rows=27,386 width=36) (actual time=6.369..65.767 rows=66,434 loops=1)

  • Hash Cond: ((t_vetrino.id_colorazione)::text = (t_colorazione.id_colorazione)::text)
  • Filter: (((t_colorazione.tp_colorazione)::text <> 'R'::text) OR (t_vetrino.id_colorazione IS NULL))
14. 31.482 36.858 ↓ 2.4 66,434 1

Bitmap Heap Scan on t_vetrino (cost=1,727.88..10,499.90 rows=27,802 width=37) (actual time=6.330..36.858 rows=66,434 loops=1)

  • Recheck Cond: (user_consegna = 0)
  • Filter: ((dt_cancel IS NULL) AND (annullato IS NULL) AND (user_taglio = 0))
  • Rows Removed by Filter: 26233
15. 5.376 5.376 ↑ 1.0 92,667 1

Bitmap Index Scan on i_vetrino1 (cost=0.00..1,720.93 rows=92,868 width=0) (actual time=5.376..5.376 rows=92,667 loops=1)

  • Index Cond: (user_consegna = 0)
16. 0.010 0.026 ↑ 1.0 38 1

Hash (cost=1.55..1.55 rows=38 width=6) (actual time=0.026..0.026 rows=38 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
17. 0.016 0.016 ↑ 1.0 38 1

Seq Scan on t_colorazione (cost=0.00..1.55 rows=38 width=6) (actual time=0.007..0.016 rows=38 loops=1)

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 17
18. 10.451 21.231 ↑ 1.0 68,700 1

Hash (cost=1,586.00..1,586.00 rows=68,700 width=7) (actual time=21.231..21.231 rows=68,700 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 2684kB
19. 10.780 10.780 ↑ 1.0 68,700 1

Seq Scan on t_vetrino_test (cost=0.00..1,586.00 rows=68,700 width=7) (actual time=0.010..10.780 rows=68,700 loops=1)

20. 43.723 122.844 ↓ 1.0 242,151 1

Hash (cost=8,025.68..8,025.68 rows=241,937 width=14) (actual time=122.844..122.844 rows=242,151 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 11132kB
21. 79.121 79.121 ↓ 1.0 242,151 1

Seq Scan on t_blocchetto b (cost=0.00..8,025.68 rows=241,937 width=14) (actual time=0.006..79.121 rows=242,151 loops=1)

  • Filter: ((dt_cancel IS NULL) AND ((tp_blocchetto)::text <> 'P'::text))
  • Rows Removed by Filter: 17423
22. 263.638 659.838 ↓ 1.0 1,163,608 1

Hash (cost=37,351.25..37,351.25 rows=1,161,265 width=14) (actual time=659.838..659.838 rows=1,163,608 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 54523kB
23. 396.200 396.200 ↓ 1.0 1,163,608 1

Seq Scan on t_prelievo (cost=0.00..37,351.25 rows=1,161,265 width=14) (actual time=0.049..396.200 rows=1,163,608 loops=1)

  • Filter: ((dt_cancel IS NULL) AND ((cd_prelievo)::text <> '-'::text))
  • Rows Removed by Filter: 9692
24. 120.130 120.130 ↑ 1.0 1 60,065

Index Scan using t_caso2 on t_caso (cost=0.43..6.53 rows=1 width=38) (actual time=0.002..0.002 rows=1 loops=60,065)

  • Index Cond: (id_acc_mat = t_prelievo.id_acc_mat)
  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 0
25. 145.910 145.910 ↑ 1.0 1 72,955

Index Scan using p_t_campionamento on t_campionamento c (cost=0.43..6.52 rows=1 width=24) (actual time=0.002..0.002 rows=1 loops=72,955)

  • Index Cond: (b.id_campionamento = id_campionamento)
26. 145.908 145.908 ↓ 0.0 0 72,954

Index Scan using i_caso7 on t_caso t_caso_1 (cost=0.43..6.53 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=72,954)

  • Index Cond: (id_caso_p = t_caso.id_caso)
  • Filter: ((dt_cancel IS NULL) AND ((fl_stato)::text <> ALL ('{I,P,V,R,Z,F}'::text[])))
  • Rows Removed by Filter: 1
27. 23.418 23.418 ↑ 1.0 1 7,806

Index Scan using p_t_paziente on t_paziente (cost=0.42..6.48 rows=1 width=20) (actual time=0.002..0.003 rows=1 loops=7,806)

  • Index Cond: (id_paziente = t_caso.id_paziente)
  • Filter: (dt_cancel IS NULL)
28. 15.608 15.608 ↑ 1.0 14 7,804

Seq Scan on t_tp_accesso (cost=0.00..1.21 rows=14 width=5) (actual time=0.001..0.002 rows=14 loops=7,804)

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 7
Total runtime : 1,726.804 ms