explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dLHK

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 27,223.687 ↓ 0.0 0 1

Sort (cost=144,137.18..144,137.23 rows=20 width=200) (actual time=27,223.687..27,223.687 rows=0 loops=1)

  • Sort Key: car.car_dt_movimento DESC, car.car_dt_bom_para
  • Sort Method: quicksort Memory: 25kB
2. 0.000 27,223.682 ↓ 0.0 0 1

Nested Loop Anti Join (cost=1.42..144,136.75 rows=20 width=200) (actual time=27,223.682..27,223.682 rows=0 loops=1)

  • Join Filter: (cartao_edi.cae_cd_cartao = car.car_cd_cartao)
3. 0.508 27,223.682 ↓ 0.0 0 1

Nested Loop (cost=0.99..144,133.65 rows=20 width=175) (actual time=27,223.682..27,223.682 rows=0 loops=1)

4. 0.000 28.291 ↓ 2.2 901 1

Nested Loop (cost=0.43..1,629.68 rows=415 width=20) (actual time=0.031..28.291 rows=901 loops=1)

5. 20.797 20.797 ↑ 1.0 7,675 1

Index Scan using administradora_pkey on administradora adm (cost=0.28..334.21 rows=7,702 width=24) (actual time=0.008..20.797 rows=7,675 loops=1)

6. 7.675 7.675 ↓ 0.0 0 7,675

Index Scan using administradora_edi_pkey on administradora_edi ade (cost=0.15..0.17 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=7,675)

  • Index Cond: (ade_cd_administradora_edi = adm.adm_cd_administradora_edi)
  • Filter: (ade_cd_gestora = 1)
  • Rows Removed by Filter: 0
7. 27,194.883 27,194.883 ↓ 0.0 0 901

Index Scan using cartao_idx_administradora on cartao car (cost=0.56..343.37 rows=1 width=159) (actual time=30.183..30.183 rows=0 loops=901)

  • Index Cond: (car_cd_administradora = adm.adm_cd_administradora)
  • Filter: (((car_ds_autorizacao)::text ~~* '%310839%'::text) AND (car_cd_cartao <> '-1'::integer) AND (car_cd_unidade_negocio = 144))
  • Rows Removed by Filter: 6,355
8. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.43..2.65 rows=1 width=4) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Index Scan using cartao_edi_unidade_dt_movimento_tm_movimento on cartao_edi (cost=0.43..2.65 rows=1 width=4) (never executed)

  • Index Cond: (cae_cd_unidade_negocio = 144)
Planning time : 6.924 ms
Execution time : 27,238.671 ms