explain.depesz.com

PostgreSQL's explain analyze made readable

Result: TNDB : Optimization for: plan #NXOj

Settings

Optimization path:

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

GroupAggregate (cost=758.45..1,183.30 rows=1 width=12) (actual time=0.009..0.009 rows=0 loops=1)

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

Nested Loop Left Join (cost=758.45..1,183.29 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=1)

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

Nested Loop (cost=758.03..1,182.30 rows=1 width=12) (actual time=0.007..0.008 rows=0 loops=1)

4. 0.007 0.007 ↓ 0.0 0 1

Index Scan using selo_compensado_dt_recurso_idx on selo_compensado (cost=0.42..8.44 rows=1 width=4) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: ((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))
  • Filter: ((cs_situacao_compensado IS NOT NULL) AND (cs_situacao_compensado = 1))
5. 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)
6. 0.000 0.000 ↓ 0.0 0

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

7. 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)
8. 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)
9. 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)
Planning time : 0.775 ms