explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jA8b

Settings
# exclusive inclusive rows x rows loops node
1. 1.634 1,405.849 ↓ 192.7 6,745 1

Nested Loop Left Join (cost=6,562.99..284,832.18 rows=35 width=19) (actual time=27.676..1,405.849 rows=6,745 loops=1)

2. 1.678 1,397.472 ↓ 192.7 6,743 1

Hash Left Join (cost=6,562.70..284,619.20 rows=35 width=19) (actual time=27.660..1,397.472 rows=6,743 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))
3. 5.099 1,395.778 ↓ 187.3 6,743 1

Hash Join (cost=6,560.68..284,616.77 rows=36 width=19) (actual time=27.633..1,395.778 rows=6,743 loops=1)

  • Hash Cond: (t_caso.id_acc_mat = t_vetrino.id_acc_mat)
4. 1.192 1,363.337 ↓ 1.5 3,922 1

Nested Loop (cost=0.43..277,500.68 rows=2,677 width=16) (actual time=0.097..1,363.337 rows=3,922 loops=1)

5. 1,256.197 1,256.197 ↓ 1.5 3,924 1

Seq Scan on t_caso t_caso_1 (cost=0.00..257,043.96 rows=2,677 width=4) (actual time=0.088..1,256.197 rows=3,924 loops=1)

  • Filter: ((dt_cancel IS NULL) AND ((fl_stato)::text <> ALL ('{I,P,V,R,Z,F}'::text[])))
  • Rows Removed by Filter: 1704516
6. 105.948 105.948 ↑ 1.0 1 3,924

Index Scan using p_t_caso on t_caso (cost=0.43..7.63 rows=1 width=20) (actual time=0.026..0.027 rows=1 loops=3,924)

  • Index Cond: (id_caso = t_caso_1.id_caso_p)
  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 0
7. 6.151 27.342 ↓ 2.0 44,755 1

Hash (cost=6,275.26..6,275.26 rows=22,799 width=11) (actual time=27.342..27.342 rows=44,755 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 1911kB
8. 17.981 21.191 ↓ 2.0 44,755 1

Bitmap Heap Scan on t_vetrino (cost=1,154.17..6,275.26 rows=22,799 width=11) (actual time=3.678..21.191 rows=44,755 loops=1)

  • Recheck Cond: (user_consegna = 0)
  • Filter: ((dt_cancel IS NULL) AND (annullato IS NULL) AND (user_taglio = 0))
  • Rows Removed by Filter: 17121
9. 3.210 3.210 ↓ 1.0 61,876 1

Bitmap Index Scan on i_vetrino1 (cost=0.00..1,148.47 rows=61,873 width=0) (actual time=3.210..3.210 rows=61,876 loops=1)

  • Index Cond: (user_consegna = 0)
10. 0.006 0.016 ↑ 1.0 38 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
11. 0.010 0.010 ↑ 1.0 38 1

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

  • Filter: (dt_cancel IS NULL)
  • Rows Removed by Filter: 17
12. 6.743 6.743 ↓ 0.0 0 6,743

Index Scan using t_vetrino_test1 on t_vetrino_test (cost=0.29..6.07 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=6,743)

  • Index Cond: (t_vetrino.id_vetrino = id_vetrino)
Total runtime : 1,406.648 ms