explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gplb

Settings
# exclusive inclusive rows x rows loops node
1. 1.011 2.736 ↓ 1.4 1,605 1

Hash Left Join (cost=58.26..660.86 rows=1,152 width=298) (actual time=0.210..2.736 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.249 1.716 ↓ 1.4 1,605 1

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

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

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

  • Hash Cond: (erp.t_pos_id = p.id)
4. 0.895 1.034 ↓ 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.165..1.034 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.000 0.139 ↓ 0.0 0 1

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

6. 0.128 0.128 ↓ 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.128..0.128 rows=1,605 loops=1)

  • Index Cond: ((fl_conc_venda)::text = 'N'::text)
7. 0.011 0.011 ↓ 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.011..0.011 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.007 0.015 ↑ 1.0 38 1

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

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

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

10. 0.000 0.003 ↑ 1.0 4 1

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

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

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

12. 0.001 0.009 ↑ 1.0 23 1

Hash (cost=1.23..1.23 rows=23 width=122) (actual time=0.009..0.009 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.002..0.008 rows=23 loops=1)

Planning time : 0.386 ms
Execution time : 2.884 ms