explain.depesz.com

PostgreSQL's explain analyze made readable

Result: no6b

Settings
# exclusive inclusive rows x rows loops node
1. 3.936 17.673 ↓ 1.4 1,605 1

Hash Left Join (cost=58.26..669.50 rows=1,152 width=298) (actual time=0.375..17.673 rows=1,605 loops=1)

  • Hash Cond: (CASE WHEN (erp.t_pos_id IS NOT NULL) THEN p.t_estab_adq_id ELSE v.t_estab_adq_id END = e.id)
2. 0.433 13.722 ↓ 1.4 1,605 1

Hash Left Join (cost=56.74..645.06 rows=1,152 width=188) (actual time=0.338..13.722 rows=1,605 loops=1)

  • Hash Cond: (erp.t_pdv_id = v.id)
3. 0.893 13.283 ↓ 1.4 1,605 1

Hash Left Join (cost=55.65..639.35 rows=1,152 width=126) (actual time=0.321..13.283 rows=1,605 loops=1)

  • Hash Cond: (erp.t_pos_id = p.id)
4. 12.112 12.365 ↓ 1.4 1,605 1

Bitmap Heap Scan on t_cv_erp erp (cost=53.80..621.96 rows=1,152 width=64) (actual time=0.287..12.365 rows=1,605 loops=1)

  • Recheck Cond: (((fl_conc_venda)::text = 'N'::text) OR ((motivo_status)::text ~~ 'COMPROVANTE DE VENDA NAO ENCONTRADO%'::text))
  • Filter: (((fl_conc_venda)::text = 'N'::text) OR (((motivo_status)::text ~~ 'COMPROVANTE DE VENDA NAO ENCONTRADO%'::text) AND ((fl_conc_venda)::text !~~ 'CONCILIADO%'::text)))
  • Heap Blocks: exact=196
5. 0.001 0.253 ↓ 0.0 0 1

BitmapOr (cost=53.80..53.80 rows=1,152 width=0) (actual time=0.253..0.253 rows=0 loops=1)

6. 0.245 0.245 ↓ 1.4 1,605 1

Bitmap Index Scan on t_cv_erp_fl_conc_venda_idx (cost=0.00..48.92 rows=1,152 width=0) (actual time=0.245..0.245 rows=1,605 loops=1)

  • Index Cond: ((fl_conc_venda)::text = 'N'::text)
7. 0.007 0.007 ↓ 0.0 0 1

Bitmap Index Scan on t_cv_erp_motivo_status_idx (cost=0.00..4.29 rows=1 width=0) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: (((motivo_status)::text ~>=~ 'COMPROVANTE DE VENDA NAO ENCONTRADO'::text) AND ((motivo_status)::text ~<~ 'COMPROVANTE DE VENDA NAO ENCONTRADP'::text))
8. 0.014 0.025 ↑ 1.0 38 1

Hash (cost=1.38..1.38 rows=38 width=66) (actual time=0.025..0.025 rows=38 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
9. 0.011 0.011 ↑ 1.0 38 1

Seq Scan on t_pos p (cost=0.00..1.38 rows=38 width=66) (actual time=0.005..0.011 rows=38 loops=1)

10. 0.002 0.006 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=66) (actual time=0.006..0.006 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.004 0.004 ↑ 1.0 4 1

Seq Scan on t_pdv v (cost=0.00..1.04 rows=4 width=66) (actual time=0.002..0.004 rows=4 loops=1)

12. 0.007 0.015 ↑ 1.0 23 1

Hash (cost=1.23..1.23 rows=23 width=122) (actual time=0.015..0.015 rows=23 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
13. 0.008 0.008 ↑ 1.0 23 1

Seq Scan on t_estab_adq e (cost=0.00..1.23 rows=23 width=122) (actual time=0.004..0.008 rows=23 loops=1)

Planning time : 0.575 ms
Execution time : 17.919 ms