explain.depesz.com

PostgreSQL's explain analyze made readable

Result: p6Qt

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

Limit (cost=10.19..23.20 rows=1 width=200) (actual time=68.689..68.689 rows=0 loops=1)

2. 0.004 68.687 ↓ 0.0 0 1

Append (cost=10.19..2,247.42 rows=172 width=200) (actual time=68.687..68.687 rows=0 loops=1)

3. 0.000 0.023 ↓ 0.0 0 1

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

4. 0.006 0.023 ↓ 0.0 0 1

Sort (cost=10.19..10.20 rows=1 width=208) (actual time=0.023..0.023 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.000 0.017 ↓ 0.0 0 1

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

6. 0.001 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.016 0.016 ↓ 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.016..0.016 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.002 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.001 0.011 ↓ 0.0 0 1

Nested Loop Anti Join (cost=1.27..10.18 rows=1 width=200) (actual time=0.010..0.011 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.008 ↓ 0.0 0 1

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

17. 0.001 0.007 ↓ 0.0 0 1

Sort (cost=10.18..10.19 rows=1 width=208) (actual time=0.007..0.007 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.001 0.006 ↓ 0.0 0 1

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

19. 0.000 0.005 ↓ 0.0 0 1

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

20. 0.005 0.005 ↓ 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.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)) 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.001 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.004 0.004 ↓ 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.004..0.004 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 23.184 ↓ 0.0 0 1

Sort (cost=462.93..462.94 rows=1 width=200) (actual time=23.184..23.184 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 23.182 ↓ 0.0 0 1

Nested Loop Anti Join (cost=422.13..462.92 rows=1 width=200) (actual time=23.182..23.182 rows=0 loops=1)

32. 0.000 23.181 ↓ 0.0 0 1

Nested Loop (cost=421.71..458.05 rows=1 width=175) (actual time=23.181..23.181 rows=0 loops=1)

33. 0.000 23.181 ↓ 0.0 0 1

Nested Loop (cost=421.56..456.37 rows=10 width=179) (actual time=23.181..23.181 rows=0 loops=1)

34. 0.003 23.181 ↓ 0.0 0 1

Bitmap Heap Scan on cartao car_4 (cost=421.27..432.44 rows=10 width=159) (actual time=23.181..23.181 rows=0 loops=1)

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

BitmapAnd (cost=421.27..421.27 rows=10 width=0) (actual time=23.178..23.178 rows=0 loops=1)

36. 23.164 23.164 ↑ 271.1 38 1

Bitmap Index Scan on cartao_gin_autorizacao (cost=0.00..94.86 rows=10,301 width=0) (actual time=23.164..23.164 rows=38 loops=1)

  • Index Cond: ((car_ds_autorizacao)::text ~~* '%621942%'::text)
37. 0.010 0.010 ↓ 0.0 0 1

Bitmap Index Scan on cartao_idx (cost=0.00..326.16 rows=30,946 width=0) (actual time=0.010..0.010 rows=0 loops=1)

  • Index Cond: (car_cd_unidade_negocio = 332)
38. 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)
39. 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)
40. 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)
41. 0.000 0.017 ↓ 0.0 0 1

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

42. 0.005 0.017 ↓ 0.0 0 1

Sort (cost=805.41..805.80 rows=155 width=209) (actual time=0.017..0.017 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
43. 0.001 0.012 ↓ 0.0 0 1

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

44. 0.000 0.011 ↓ 0.0 0 1

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

45. 0.011 0.011 ↓ 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.011..0.011 rows=0 loops=1)

  • Index Cond: ((car_cd_unidade_negocio = 332) AND ((car_ds_autorizacao)::text = '621942'::text))
  • Filter: (car_cd_cartao <> '-1'::integer)
46. 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)
47. 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)
48. 0.001 22.891 ↓ 0.0 0 1

Subquery Scan on x_4 (cost=485.28..485.41 rows=10 width=200) (actual time=22.891..22.891 rows=0 loops=1)

49. 0.004 22.890 ↓ 0.0 0 1

Sort (cost=485.28..485.31 rows=10 width=204) (actual time=22.890..22.890 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
50. 0.000 22.886 ↓ 0.0 0 1

Nested Loop Anti Join (cost=421.98..485.11 rows=10 width=204) (actual time=22.886..22.886 rows=0 loops=1)

51. 0.001 22.886 ↓ 0.0 0 1

Nested Loop (cost=421.56..456.37 rows=10 width=175) (actual time=22.886..22.886 rows=0 loops=1)

52. 0.002 22.885 ↓ 0.0 0 1

Bitmap Heap Scan on cartao car_6 (cost=421.27..432.44 rows=10 width=159) (actual time=22.885..22.885 rows=0 loops=1)

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

BitmapAnd (cost=421.27..421.27 rows=10 width=0) (actual time=22.883..22.883 rows=0 loops=1)

54. 22.866 22.866 ↑ 271.1 38 1

Bitmap Index Scan on cartao_gin_autorizacao (cost=0.00..94.86 rows=10,301 width=0) (actual time=22.866..22.866 rows=38 loops=1)

  • Index Cond: ((car_ds_autorizacao)::text ~~* '%621942%'::text)
55. 0.012 0.012 ↓ 0.0 0 1

Bitmap Index Scan on cartao_idx (cost=0.00..326.16 rows=30,946 width=0) (actual time=0.012..0.012 rows=0 loops=1)

  • Index Cond: (car_cd_unidade_negocio = 332)
56. 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)
57. 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)
58. 0.008 22.525 ↓ 0.0 0 1

Sort (cost=439.85..439.85 rows=1 width=200) (actual time=22.525..22.525 rows=0 loops=1)

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

Nested Loop Anti Join (cost=421.98..439.84 rows=1 width=200) (actual time=22.517..22.517 rows=0 loops=1)

60. 0.001 22.516 ↓ 0.0 0 1

Nested Loop (cost=421.55..434.97 rows=1 width=175) (actual time=22.516..22.516 rows=0 loops=1)

61. 0.001 22.515 ↓ 0.0 0 1

Bitmap Heap Scan on cartao car_7 (cost=421.27..432.46 rows=1 width=159) (actual time=22.515..22.515 rows=0 loops=1)

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

BitmapAnd (cost=421.27..421.27 rows=10 width=0) (actual time=22.514..22.514 rows=0 loops=1)

63. 22.503 22.503 ↑ 271.1 38 1

Bitmap Index Scan on cartao_gin_autorizacao (cost=0.00..94.86 rows=10,301 width=0) (actual time=22.503..22.503 rows=38 loops=1)

  • Index Cond: ((car_ds_autorizacao)::text ~~* '%621942%'::text)
64. 0.007 0.007 ↓ 0.0 0 1

Bitmap Index Scan on cartao_idx (cost=0.00..326.16 rows=30,946 width=0) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: (car_cd_unidade_negocio = 332)
65. 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)
66. 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)
67. 0.004 0.015 ↓ 0.0 0 1

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

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

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

69. 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)

70. 0.010 0.010 ↓ 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.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_cd_cartao <> '-1'::integer)
71. 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)
72. 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 : 23.483 ms
Execution time : 69.105 ms