explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NXOj

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.001 7.091 ↓ 0.0 0 1

GroupAggregate (cost=1,267.04..4,582.90 rows=1 width=12) (actual time=7.091..7.091 rows=0 loops=1)

  • Group Key: selo.id_cartorio
2. 0.000 7.090 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,267.04..4,582.89 rows=1 width=8) (actual time=7.090..7.090 rows=0 loops=1)

  • Filter: ((selo_analisado.cs_situacao_isento <> 2) OR (selo_analisado.cs_situacao_isento IS NULL))
3. 0.002 7.090 ↓ 0.0 0 1

Nested Loop (cost=1,266.62..4,581.90 rows=1 width=12) (actual time=7.089..7.090 rows=0 loops=1)

4. 6.005 7.088 ↓ 0.0 0 1

Bitmap Heap Scan on selo_compensado (cost=509.01..3,408.04 rows=1 width=4) (actual time=7.088..7.088 rows=0 loops=1)

  • Recheck Cond: ((cs_situacao_compensado IS NOT NULL) AND (cs_situacao_compensado = 1))
  • Filter: ((dt_recurso >= '2020-08-01 00:00:00'::timestamp without time zone) AND (dt_recurso <= '2020-08-31 23:59:59'::timestamp without time zone))
  • Rows Removed by Filter: 24,383
  • Heap Blocks: exact=979
5. 1.083 1.083 ↓ 1.0 24,446 1

Bitmap Index Scan on selo_compensado_cs_situacao_compensado_idx (cost=0.00..509.01 rows=24,059 width=0) (actual time=1.083..1.083 rows=24,446 loops=1)

  • Index Cond: ((cs_situacao_compensado IS NOT NULL) AND (cs_situacao_compensado = 1))
6. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on selo (cost=757.61..1,172.82 rows=104 width=16) (never executed)

  • Recheck Cond: ((id_selo_compensado = selo_compensado.id_selo_compensado) AND (id_cartorio = 82))
  • Filter: (cs_situacao_selo = 0)
7. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=757.61..757.61 rows=105 width=0) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on selo_id_selo_compensado_idx (cost=0.00..342.04 rows=17,814 width=0) (never executed)

  • Index Cond: (id_selo_compensado = selo_compensado.id_selo_compensado)
9. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on selo_id_cartorio_idx (cost=0.00..410.09 rows=21,021 width=0) (never executed)

  • Index Cond: (id_cartorio = 82)
10. 0.000 0.000 ↓ 0.0 0

Index Scan using selo_analisado_pkey on selo_analisado (cost=0.42..0.97 rows=1 width=8) (never executed)

  • Index Cond: (id_selo_analisado = selo.id_selo_analisado)