explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kbfd1

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.731 ↓ 0.0 0 1

Limit (cost=10.19..16.18 rows=1 width=200) (actual time=0.731..0.731 rows=0 loops=1)

2. 0.001 0.729 ↓ 0.0 0 1

Append (cost=10.19..1,040.01 rows=172 width=200) (actual time=0.729..0.729 rows=0 loops=1)

3. 0.001 0.025 ↓ 0.0 0 1

Subquery Scan on x (cost=10.19..10.21 rows=1 width=200) (actual time=0.025..0.025 rows=0 loops=1)

4. 0.006 0.024 ↓ 0.0 0 1

Sort (cost=10.19..10.20 rows=1 width=208) (actual time=0.024..0.024 rows=0 loops=1)

  • Sort Key: (abs((car.car_dt_bom_para - '2020-07-06'::date))), car.car_cd_parcelamento
  • Sort Method: quicksort Memory: 25kB
5. 0.001 0.018 ↓ 0.0 0 1

Nested Loop Anti Join (cost=1.27..10.18 rows=1 width=208) (actual time=0.018..0.018 rows=0 loops=1)

6. 0.000 0.017 ↓ 0.0 0 1

Nested Loop (cost=0.85..5.31 rows=1 width=179) (actual time=0.017..0.017 rows=0 loops=1)

7. 0.017 0.017 ↓ 0.0 0 1

Index Scan using cartao_idx_filial_aut_valor_dt_adm on cartao car (cost=0.56..2.80 rows=1 width=163) (actual time=0.017..0.017 rows=0 loops=1)

  • Index Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text = '621942'::text) AND (car_vl_cartao >= 226.98::numeric(18,2)) AND (car_vl_cartao <= 227.02::numeric(18,2)) AND (car_dt_movimento = '2020-06-05'::date) AND (car_cd_administradora = 7,870))
  • Filter: (car_cd_cartao <> '-1'::integer)
8. 0.000 0.000 ↓ 0.0 0

Index Scan using administradora_pkey on administradora adm (cost=0.29..2.50 rows=1 width=20) (never executed)

  • Index Cond: (adm_cd_administradora = 7,870)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using cartao_edi_idx_cartao_nao_vinculado on cartao_edi (cost=0.42..2.64 rows=1 width=4) (never executed)

  • Index Cond: (cae_cd_cartao = car.car_cd_cartao)
  • Filter: (cae_cd_unidade_negocio = 332)
10. 0.003 0.013 ↓ 0.0 0 1

Sort (cost=10.19..10.19 rows=1 width=200) (actual time=0.013..0.013 rows=0 loops=1)

  • Sort Key: car_1.car_dt_bom_para
  • Sort Method: quicksort Memory: 25kB
11. 0.000 0.010 ↓ 0.0 0 1

Nested Loop Anti Join (cost=1.27..10.18 rows=1 width=200) (actual time=0.010..0.010 rows=0 loops=1)

12. 0.000 0.010 ↓ 0.0 0 1

Nested Loop (cost=0.85..5.30 rows=1 width=175) (actual time=0.010..0.010 rows=0 loops=1)

13. 0.010 0.010 ↓ 0.0 0 1

Index Scan using cartao_idx_filial_adm_dt_valor_aut on cartao car_1 (cost=0.56..2.79 rows=1 width=159) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: ((car_cd_unidade_negocio = 332) AND (car_cd_administradora = 7,870) AND (car_dt_movimento = '2020-06-05'::date) AND (car_vl_cartao = 227.0))
  • Filter: (((car_ds_autorizacao)::text ~~* '%621942%'::text) AND (car_cd_cartao <> '-1'::integer))
14. 0.000 0.000 ↓ 0.0 0

Index Scan using administradora_pkey on administradora adm_1 (cost=0.29..2.50 rows=1 width=20) (never executed)

  • Index Cond: (adm_cd_administradora = 7,870)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using cartao_edi_idx_cartao_nao_vinculado on cartao_edi cartao_edi_1 (cost=0.42..2.64 rows=1 width=4) (never executed)

  • Index Cond: (cae_cd_cartao = car_1.car_cd_cartao)
  • Filter: (cae_cd_unidade_negocio = 332)
16. 0.001 0.012 ↓ 0.0 0 1

Subquery Scan on x_1 (cost=10.18..10.20 rows=1 width=200) (actual time=0.012..0.012 rows=0 loops=1)

17. 0.002 0.011 ↓ 0.0 0 1

Sort (cost=10.18..10.19 rows=1 width=208) (actual time=0.011..0.011 rows=0 loops=1)

  • Sort Key: (abs((car_2.car_dt_bom_para - '2020-07-06'::date))), car_2.car_cd_parcelamento
  • Sort Method: quicksort Memory: 25kB
18. 0.000 0.009 ↓ 0.0 0 1

Nested Loop Anti Join (cost=1.27..10.17 rows=1 width=208) (actual time=0.009..0.009 rows=0 loops=1)

19. 0.000 0.009 ↓ 0.0 0 1

Nested Loop (cost=0.85..5.30 rows=1 width=179) (actual time=0.009..0.009 rows=0 loops=1)

20. 0.009 0.009 ↓ 0.0 0 1

Index Scan using cartao_idx_filial_aut_valor_dt_adm on cartao car_2 (cost=0.56..2.79 rows=1 width=163) (actual time=0.009..0.009 rows=0 loops=1)

  • Index Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text = '621942'::text) AND (car_vl_cartao >= 226.98::numeric(18,2)) AND (car_vl_cartao <= 227.02::numeric(18,2)) AND (car_dt_movimento = '2020-06-05'::date))
  • Filter: (car_cd_cartao <> '-1'::integer)
21. 0.000 0.000 ↓ 0.0 0

Index Scan using administradora_pkey on administradora adm_2 (cost=0.29..2.50 rows=1 width=20) (never executed)

  • Index Cond: (adm_cd_administradora = car_2.car_cd_administradora)
22. 0.000 0.000 ↓ 0.0 0

Index Scan using cartao_edi_idx_cartao_nao_vinculado on cartao_edi cartao_edi_2 (cost=0.42..2.64 rows=1 width=4) (never executed)

  • Index Cond: (cae_cd_cartao = car_2.car_cd_cartao)
  • Filter: (cae_cd_unidade_negocio = 332)
23. 0.000 0.007 ↓ 0.0 0 1

Subquery Scan on x_2 (cost=10.18..10.19 rows=1 width=200) (actual time=0.007..0.007 rows=0 loops=1)

24. 0.002 0.007 ↓ 0.0 0 1

Sort (cost=10.18..10.18 rows=1 width=208) (actual time=0.007..0.007 rows=0 loops=1)

  • Sort Key: car_3.car_dt_movimento DESC, (abs((car_3.car_dt_bom_para - '2020-07-06'::date))), car_3.car_cd_parcelamento
  • Sort Method: quicksort Memory: 25kB
25. 0.000 0.005 ↓ 0.0 0 1

Nested Loop Anti Join (cost=1.27..10.17 rows=1 width=208) (actual time=0.005..0.005 rows=0 loops=1)

26. 0.000 0.005 ↓ 0.0 0 1

Nested Loop (cost=0.85..5.29 rows=1 width=179) (actual time=0.005..0.005 rows=0 loops=1)

27. 0.005 0.005 ↓ 0.0 0 1

Index Scan using cartao_idx_filial_aut_valor_dt_adm on cartao car_3 (cost=0.56..2.79 rows=1 width=163) (actual time=0.005..0.005 rows=0 loops=1)

  • Index Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text = '621942'::text) AND (car_vl_cartao >= 226.98::numeric(18,2)) AND (car_vl_cartao <= 227.02::numeric(18,2)))
  • Filter: (car_cd_cartao <> '-1'::integer)
28. 0.000 0.000 ↓ 0.0 0

Index Scan using administradora_pkey on administradora adm_3 (cost=0.29..2.50 rows=1 width=20) (never executed)

  • Index Cond: (adm_cd_administradora = car_3.car_cd_administradora)
29. 0.000 0.000 ↓ 0.0 0

Index Scan using cartao_edi_idx_cartao_nao_vinculado on cartao_edi cartao_edi_3 (cost=0.42..2.64 rows=1 width=4) (never executed)

  • Index Cond: (cae_cd_cartao = car_3.car_cd_cartao)
  • Filter: (cae_cd_unidade_negocio = 332)
30. 0.002 0.257 ↓ 0.0 0 1

Sort (cost=60.46..60.46 rows=1 width=200) (actual time=0.257..0.257 rows=0 loops=1)

  • Sort Key: car_4.car_dt_movimento DESC, car_4.car_dt_bom_para
  • Sort Method: quicksort Memory: 25kB
31. 0.001 0.255 ↓ 0.0 0 1

Nested Loop Anti Join (cost=19.66..60.45 rows=1 width=200) (actual time=0.255..0.255 rows=0 loops=1)

32. 0.000 0.254 ↓ 0.0 0 1

Nested Loop (cost=19.23..55.58 rows=1 width=175) (actual time=0.254..0.254 rows=0 loops=1)

33. 0.000 0.254 ↓ 0.0 0 1

Nested Loop (cost=19.09..53.90 rows=10 width=179) (actual time=0.254..0.254 rows=0 loops=1)

34. 0.002 0.254 ↓ 0.0 0 1

Bitmap Heap Scan on cartao car_4 (cost=18.80..29.97 rows=10 width=159) (actual time=0.254..0.254 rows=0 loops=1)

  • Recheck Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text ~~* '%621942%'::text))
  • Filter: (car_cd_cartao <> '-1'::integer)
35. 0.252 0.252 ↓ 0.0 0 1

Bitmap Index Scan on cartao_gin_filial_autorizacao (cost=0.00..18.80 rows=10 width=0) (actual time=0.252..0.252 rows=0 loops=1)

  • Index Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text ~~* '%621942%'::text))
36. 0.000 0.000 ↓ 0.0 0

Index Scan using administradora_pkey on administradora adm_4 (cost=0.29..2.39 rows=1 width=24) (never executed)

  • Index Cond: (adm_cd_administradora = car_4.car_cd_administradora)
37. 0.000 0.000 ↓ 0.0 0

Index Scan using administradora_edi_pkey on administradora_edi ade (cost=0.15..0.17 rows=1 width=4) (never executed)

  • Index Cond: (ade_cd_administradora_edi = adm_4.adm_cd_administradora_edi)
  • Filter: (ade_cd_gestora = 2)
38. 0.000 0.000 ↓ 0.0 0

Index Scan using cartao_edi_idx_cartao_nao_vinculado on cartao_edi cartao_edi_4 (cost=0.42..2.64 rows=1 width=4) (never executed)

  • Index Cond: (cae_cd_cartao = car_4.car_cd_cartao)
  • Filter: (cae_cd_unidade_negocio = 332)
39. 0.000 0.016 ↓ 0.0 0 1

Subquery Scan on x_3 (cost=805.41..807.35 rows=155 width=200) (actual time=0.016..0.016 rows=0 loops=1)

40. 0.003 0.016 ↓ 0.0 0 1

Sort (cost=805.41..805.80 rows=155 width=209) (actual time=0.016..0.016 rows=0 loops=1)

  • Sort Key: ((car_5.car_cd_administradora = 7,870)), car_5.car_dt_movimento DESC, (abs((car_5.car_dt_bom_para - '2020-07-06'::date))), car_5.car_cd_parcelamento
  • Sort Method: quicksort Memory: 25kB
41. 0.001 0.013 ↓ 0.0 0 1

Nested Loop Anti Join (cost=1.27..799.78 rows=155 width=209) (actual time=0.012..0.013 rows=0 loops=1)

42. 0.000 0.012 ↓ 0.0 0 1

Nested Loop (cost=0.85..393.39 rows=155 width=179) (actual time=0.012..0.012 rows=0 loops=1)

43. 0.012 0.012 ↓ 0.0 0 1

Index Scan using cartao_idx_autorizacao on cartao car_5 (cost=0.56..162.80 rows=155 width=163) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text = '621942'::text))
  • Filter: (car_cd_cartao <> '-1'::integer)
44. 0.000 0.000 ↓ 0.0 0

Index Scan using administradora_pkey on administradora adm_5 (cost=0.29..1.49 rows=1 width=20) (never executed)

  • Index Cond: (adm_cd_administradora = car_5.car_cd_administradora)
45. 0.000 0.000 ↓ 0.0 0

Index Scan using cartao_edi_idx_cartao_nao_vinculado on cartao_edi cartao_edi_5 (cost=0.42..2.59 rows=1 width=4) (never executed)

  • Index Cond: (cae_cd_cartao = car_5.car_cd_cartao)
  • Filter: (cae_cd_unidade_negocio = 332)
46. 0.000 0.198 ↓ 0.0 0 1

Subquery Scan on x_4 (cost=82.81..82.93 rows=10 width=200) (actual time=0.198..0.198 rows=0 loops=1)

47. 0.003 0.198 ↓ 0.0 0 1

Sort (cost=82.81..82.83 rows=10 width=204) (actual time=0.198..0.198 rows=0 loops=1)

  • Sort Key: (((car_6.car_ds_autorizacao)::text <-> '621942'::text)), car_6.car_dt_movimento DESC, car_6.car_dt_bom_para
  • Sort Method: quicksort Memory: 25kB
48. 0.000 0.195 ↓ 0.0 0 1

Nested Loop Anti Join (cost=19.51..82.64 rows=10 width=204) (actual time=0.195..0.195 rows=0 loops=1)

49. 0.000 0.195 ↓ 0.0 0 1

Nested Loop (cost=19.09..53.90 rows=10 width=175) (actual time=0.195..0.195 rows=0 loops=1)

50. 0.001 0.195 ↓ 0.0 0 1

Bitmap Heap Scan on cartao car_6 (cost=18.80..29.97 rows=10 width=159) (actual time=0.194..0.195 rows=0 loops=1)

  • Recheck Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text ~~* '%621942%'::text))
  • Filter: (car_cd_cartao <> '-1'::integer)
51. 0.194 0.194 ↓ 0.0 0 1

Bitmap Index Scan on cartao_gin_filial_autorizacao (cost=0.00..18.80 rows=10 width=0) (actual time=0.194..0.194 rows=0 loops=1)

  • Index Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text ~~* '%621942%'::text))
52. 0.000 0.000 ↓ 0.0 0

Index Scan using administradora_pkey on administradora adm_6 (cost=0.29..2.39 rows=1 width=20) (never executed)

  • Index Cond: (adm_cd_administradora = car_6.car_cd_administradora)
53. 0.000 0.000 ↓ 0.0 0

Index Scan using cartao_edi_idx_cartao_nao_vinculado on cartao_edi cartao_edi_6 (cost=0.42..2.64 rows=1 width=4) (never executed)

  • Index Cond: (cae_cd_cartao = car_6.car_cd_cartao)
  • Filter: (cae_cd_unidade_negocio = 332)
54. 0.002 0.192 ↓ 0.0 0 1

Sort (cost=37.38..37.38 rows=1 width=200) (actual time=0.192..0.192 rows=0 loops=1)

  • Sort Key: car_7.car_dt_movimento DESC, car_7.car_dt_bom_para
  • Sort Method: quicksort Memory: 25kB
55. 0.001 0.190 ↓ 0.0 0 1

Nested Loop Anti Join (cost=19.51..37.37 rows=1 width=200) (actual time=0.190..0.190 rows=0 loops=1)

56. 0.000 0.189 ↓ 0.0 0 1

Nested Loop (cost=19.08..32.50 rows=1 width=175) (actual time=0.189..0.189 rows=0 loops=1)

57. 0.000 0.189 ↓ 0.0 0 1

Bitmap Heap Scan on cartao car_7 (cost=18.80..30.00 rows=1 width=159) (actual time=0.189..0.189 rows=0 loops=1)

  • Recheck Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text ~~* '%621942%'::text))
  • Filter: ((car_cd_cartao <> '-1'::integer) AND (car_vl_cartao = 227.0))
58. 0.189 0.189 ↓ 0.0 0 1

Bitmap Index Scan on cartao_gin_filial_autorizacao (cost=0.00..18.80 rows=10 width=0) (actual time=0.189..0.189 rows=0 loops=1)

  • Index Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text ~~* '%621942%'::text))
59. 0.000 0.000 ↓ 0.0 0

Index Scan using administradora_pkey on administradora adm_7 (cost=0.29..2.50 rows=1 width=20) (never executed)

  • Index Cond: (adm_cd_administradora = car_7.car_cd_administradora)
60. 0.000 0.000 ↓ 0.0 0

Index Scan using cartao_edi_idx_cartao_nao_vinculado on cartao_edi cartao_edi_7 (cost=0.42..2.64 rows=1 width=4) (never executed)

  • Index Cond: (cae_cd_cartao = car_7.car_cd_cartao)
  • Filter: (cae_cd_unidade_negocio = 332)
61. 0.001 0.008 ↓ 0.0 0 1

Sort (cost=10.18..10.19 rows=1 width=200) (actual time=0.008..0.008 rows=0 loops=1)

  • Sort Key: car_8.car_dt_bom_para
  • Sort Method: quicksort Memory: 25kB
62. 0.001 0.007 ↓ 0.0 0 1

Nested Loop Anti Join (cost=1.27..10.17 rows=1 width=200) (actual time=0.007..0.007 rows=0 loops=1)

63. 0.000 0.006 ↓ 0.0 0 1

Nested Loop (cost=0.85..5.30 rows=1 width=175) (actual time=0.006..0.006 rows=0 loops=1)

64. 0.006 0.006 ↓ 0.0 0 1

Index Scan using cartao_idx_filial_adm_dt_valor_aut on cartao car_8 (cost=0.56..2.79 rows=1 width=159) (actual time=0.006..0.006 rows=0 loops=1)

  • Index Cond: ((car_cd_unidade_negocio = 332) AND (car_cd_administradora = 7,870) AND (car_dt_movimento = '2020-06-05'::date) AND (car_vl_cartao = 227.0))
  • Filter: (car_cd_cartao <> '-1'::integer)
65. 0.000 0.000 ↓ 0.0 0

Index Scan using administradora_pkey on administradora adm_8 (cost=0.29..2.50 rows=1 width=20) (never executed)

  • Index Cond: (adm_cd_administradora = 7,870)
66. 0.000 0.000 ↓ 0.0 0

Index Scan using cartao_edi_idx_cartao_nao_vinculado on cartao_edi cartao_edi_8 (cost=0.42..2.64 rows=1 width=4) (never executed)

  • Index Cond: (cae_cd_cartao = car_8.car_cd_cartao)
  • Filter: (cae_cd_unidade_negocio = 332)
Planning time : 22.198 ms
Execution time : 1.105 ms