explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ouS

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=51,962.47..51,962.50 rows=10 width=60) (actual rows= loops=)

  • Sort Key: "*SELECT* 1".valorx
2. 0.000 0.000 ↓ 0.0

Append (cost=10,395.90..51,962.30 rows=10 width=60) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 1 (cost=10,395.90..10,396.40 rows=6 width=60) (actual rows= loops=)

  • Filter: ("*SELECT* 1".valory > '0'::numeric)
4. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,395.90..10,396.17 rows=18 width=42) (actual rows= loops=)

  • Group Key: 'Valor Inscrito'::text, origem.valorx
5. 0.000 0.000 ↓ 0.0

Subquery Scan on origem (cost=10,390.68..10,391.18 rows=18 width=42) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,390.68..10,391.00 rows=18 width=27) (actual rows= loops=)

  • Group Key: date_part('year'::text, (tbdividaativa.divdatainscricao)::timestamp without time zone), tblctoformapgto.moecodigo
7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.98..10,390.32 rows=18 width=27) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.41..10,377.74 rows=18 width=26) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..10,365.94 rows=18 width=24) (actual rows= loops=)

  • Join Filter: ((tbdividaativa.lctnumero = tblctoformapgto.lctnumero) AND (tbdividaativa.lctano = tblctoformapgto.lctano))
10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..10,313.73 rows=71 width=24) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on tbdividaativa (cost=0.00..8,037.15 rows=973 width=14) (actual rows= loops=)

  • Filter: ((date_part('year'::text, (divdatainscricao)::timestamp without time zone) >= '2000'::double precision) AND (date_part('year'::text, (divdatainscricao)::timestamp without time zone) <= '2019'::double precision))
12. 0.000 0.000 ↓ 0.0

Index Scan using pk_tblancamento_normatizado on tblancamento_normatizado tblancamento (cost=0.43..2.33 rows=1 width=10) (actual rows= loops=)

  • Index Cond: ((lctano = tbdividaativa.lctano) AND (lctnumero = tbdividaativa.lctnumero))
  • Filter: (lcttipodebito = 2)
13. 0.000 0.000 ↓ 0.0

Index Scan using idx_tblctoformapgto_opt_parcia on tblctoformapgto (cost=0.43..0.72 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((lctano = tblancamento.lctano) AND (lctnumero = tblancamento.lctnumero))
  • Filter: ((lfpsituacao = 1) AND (lfpordem = 1))
14. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tblctoparcela on tblctoparcela (cost=0.56..0.65 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((lctano = tblctoformapgto.lctano) AND (lctnumero = tblctoformapgto.lctnumero) AND (fpcano = tblctoformapgto.fpcano) AND (fpccodigo = tblctoformapgto.fpccodigo) AND (lfpsequencia = tblctoformapgto.lfpsequencia))
15. 0.000 0.000 ↓ 0.0

Index Scan using idx_lctotributo_chave_lctoparc on tblctotributo (cost=0.56..0.68 rows=1 width=41) (actual rows= loops=)

  • Index Cond: ((lctano = tblctoparcela.lctano) AND (lctnumero = tblctoparcela.lctnumero) AND (fpcano = tblctoparcela.fpcano) AND (fpccodigo = tblctoparcela.fpccodigo) AND (lfpsequencia = tblctoparcela.lfpsequencia) AND (plcparcela = tblctoparcela.plcparcela))
16. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 2 (cost=10,391.17..10,391.19 rows=1 width=60) (actual rows= loops=)

  • Filter: ("*SELECT* 2".valory > '0'::numeric)
17. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,391.17..10,391.18 rows=1 width=42) (actual rows= loops=)

  • Group Key: 'Valor Em Aberto'::text, origem_1.valorx
18. 0.000 0.000 ↓ 0.0

Subquery Scan on origem_1 (cost=10,390.88..10,390.90 rows=1 width=42) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,390.88..10,390.89 rows=1 width=27) (actual rows= loops=)

  • Group Key: date_part('year'::text, (tbdividaativa_1.divdatainscricao)::timestamp without time zone), tblctoformapgto_1.moecodigo
20. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.98..10,390.86 rows=1 width=27) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.41..10,389.32 rows=1 width=26) (actual rows= loops=)

  • Join Filter: ((tbdividaativa_1.lctnumero = tblctoparcela_1.lctnumero) AND (tbdividaativa_1.lctano = tblctoparcela_1.lctano))
22. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..10,365.76 rows=34 width=44) (actual rows= loops=)

  • Join Filter: ((tbdividaativa_1.lctnumero = tblctoformapgto_1.lctnumero) AND (tbdividaativa_1.lctano = tblctoformapgto_1.lctano))
23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..10,313.73 rows=71 width=24) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Seq Scan on tbdividaativa tbdividaativa_1 (cost=0.00..8,037.15 rows=973 width=14) (actual rows= loops=)

  • Filter: ((date_part('year'::text, (divdatainscricao)::timestamp without time zone) >= '2000'::double precision) AND (date_part('year'::text, (divdatainscricao)::timestamp without time zone) <= '2019'::double precision))
25. 0.000 0.000 ↓ 0.0

Index Scan using pk_tblancamento_normatizado on tblancamento_normatizado tblancamento_1 (cost=0.43..2.33 rows=1 width=10) (actual rows= loops=)

  • Index Cond: ((lctano = tbdividaativa_1.lctano) AND (lctnumero = tbdividaativa_1.lctnumero))
  • Filter: (lcttipodebito = 2)
26. 0.000 0.000 ↓ 0.0

Index Scan using idx_tblctoformapgto_opt_parcia on tblctoformapgto tblctoformapgto_1 (cost=0.43..0.72 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((lctano = tblancamento_1.lctano) AND (lctnumero = tblancamento_1.lctnumero))
  • Filter: (lfpsituacao = 1)
27. 0.000 0.000 ↓ 0.0

Index Scan using idx_lctoparcela_chave_formapgt on tblctoparcela tblctoparcela_1 (cost=0.56..0.68 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((lctano = tblctoformapgto_1.lctano) AND (lctnumero = tblctoformapgto_1.lctnumero) AND (fpcano = tblctoformapgto_1.fpcano) AND (fpccodigo = tblctoformapgto_1.fpccodigo) AND (lfpsequencia = tblctoformapgto_1.lfpsequencia))
  • Filter: (plcsituacao = 0)
28. 0.000 0.000 ↓ 0.0

Index Scan using idx_lctotributo_chave_lctoparc on tblctotributo tblctotributo_1 (cost=0.56..1.52 rows=1 width=41) (actual rows= loops=)

  • Index Cond: ((lctano = tblctoparcela_1.lctano) AND (lctnumero = tblctoparcela_1.lctnumero) AND (fpcano = tblctoparcela_1.fpcano) AND (fpccodigo = tblctoparcela_1.fpccodigo) AND (lfpsequencia = tblctoparcela_1.lfpsequencia) AND (plcparcela = tblctoparcela_1.plcparcela))
29. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 3 (cost=10,392.18..10,392.21 rows=1 width=60) (actual rows= loops=)

  • Filter: ("*SELECT* 3".valory > '0'::numeric)
30. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,392.18..10,392.19 rows=1 width=42) (actual rows= loops=)

  • Group Key: 'Valor Prescrito'::text, origem_2.valorx
31. 0.000 0.000 ↓ 0.0

Subquery Scan on origem_2 (cost=10,391.89..10,391.92 rows=1 width=42) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,391.89..10,391.91 rows=1 width=27) (actual rows= loops=)

  • Group Key: date_part('year'::text, (tbdividaativa_2.divdatainscricao)::timestamp without time zone), tblctoformapgto_2.moecodigo
33. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.98..10,391.87 rows=1 width=27) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.41..10,389.32 rows=1 width=26) (actual rows= loops=)

  • Join Filter: ((tbdividaativa_2.lctnumero = tblctoparcela_2.lctnumero) AND (tbdividaativa_2.lctano = tblctoparcela_2.lctano))
35. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..10,365.76 rows=34 width=44) (actual rows= loops=)

  • Join Filter: ((tbdividaativa_2.lctnumero = tblctoformapgto_2.lctnumero) AND (tbdividaativa_2.lctano = tblctoformapgto_2.lctano))
36. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..10,313.73 rows=71 width=24) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Seq Scan on tbdividaativa tbdividaativa_2 (cost=0.00..8,037.15 rows=973 width=14) (actual rows= loops=)

  • Filter: ((date_part('year'::text, (divdatainscricao)::timestamp without time zone) >= '2000'::double precision) AND (date_part('year'::text, (divdatainscricao)::timestamp without time zone) <= '2019'::double precision))
38. 0.000 0.000 ↓ 0.0

Index Scan using pk_tblancamento_normatizado on tblancamento_normatizado tblancamento_2 (cost=0.43..2.33 rows=1 width=10) (actual rows= loops=)

  • Index Cond: ((lctano = tbdividaativa_2.lctano) AND (lctnumero = tbdividaativa_2.lctnumero))
  • Filter: (lcttipodebito = 2)
39. 0.000 0.000 ↓ 0.0

Index Scan using idx_tblctoformapgto_opt_parcia on tblctoformapgto tblctoformapgto_2 (cost=0.43..0.72 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((lctano = tblancamento_2.lctano) AND (lctnumero = tblancamento_2.lctnumero))
  • Filter: (lfpsituacao = 1)
40. 0.000 0.000 ↓ 0.0

Index Scan using idx_lctoparcela_chave_formapgt on tblctoparcela tblctoparcela_2 (cost=0.56..0.68 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((lctano = tblctoformapgto_2.lctano) AND (lctnumero = tblctoformapgto_2.lctnumero) AND (fpcano = tblctoformapgto_2.fpcano) AND (fpccodigo = tblctoformapgto_2.fpccodigo) AND (lfpsequencia = tblctoformapgto_2.lfpsequencia))
  • Filter: (plcsituacao = 21)
41. 0.000 0.000 ↓ 0.0

Index Scan using idx_lctotributo_chave_lctoparc on tblctotributo tblctotributo_2 (cost=0.56..2.53 rows=1 width=41) (actual rows= loops=)

  • Index Cond: ((lctano = tblctoparcela_2.lctano) AND (lctnumero = tblctoparcela_2.lctnumero) AND (fpcano = tblctoparcela_2.fpcano) AND (fpccodigo = tblctoparcela_2.fpccodigo) AND (lfpsequencia = tblctoparcela_2.lfpsequencia) AND (plcparcela = tblctoparcela_2.plcparcela))
42. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 4 (cost=10,391.91..10,391.94 rows=1 width=60) (actual rows= loops=)

  • Filter: ("*SELECT* 4".valory > '0'::numeric)
43. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,391.91..10,391.93 rows=1 width=42) (actual rows= loops=)

  • Group Key: 'Valor Cancelado'::text, origem_3.valorx
44. 0.000 0.000 ↓ 0.0

Subquery Scan on origem_3 (cost=10,391.62..10,391.65 rows=1 width=42) (actual rows= loops=)

45. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,391.62..10,391.64 rows=1 width=27) (actual rows= loops=)

  • Group Key: date_part('year'::text, (tbdividaativa_3.divdatainscricao)::timestamp without time zone), tblctoformapgto_3.moecodigo
46. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.98..10,391.60 rows=1 width=27) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.41..10,389.32 rows=1 width=26) (actual rows= loops=)

  • Join Filter: ((tbdividaativa_3.lctnumero = tblctoparcela_3.lctnumero) AND (tbdividaativa_3.lctano = tblctoparcela_3.lctano))
48. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..10,365.76 rows=34 width=44) (actual rows= loops=)

  • Join Filter: ((tbdividaativa_3.lctnumero = tblctoformapgto_3.lctnumero) AND (tbdividaativa_3.lctano = tblctoformapgto_3.lctano))
49. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..10,313.73 rows=71 width=24) (actual rows= loops=)

50. 0.000 0.000 ↓ 0.0

Seq Scan on tbdividaativa tbdividaativa_3 (cost=0.00..8,037.15 rows=973 width=14) (actual rows= loops=)

  • Filter: ((date_part('year'::text, (divdatainscricao)::timestamp without time zone) >= '2000'::double precision) AND (date_part('year'::text, (divdatainscricao)::timestamp without time zone) <= '2019'::double precision))
51. 0.000 0.000 ↓ 0.0

Index Scan using pk_tblancamento_normatizado on tblancamento_normatizado tblancamento_3 (cost=0.43..2.33 rows=1 width=10) (actual rows= loops=)

  • Index Cond: ((lctano = tbdividaativa_3.lctano) AND (lctnumero = tbdividaativa_3.lctnumero))
  • Filter: (lcttipodebito = 2)
52. 0.000 0.000 ↓ 0.0

Index Scan using idx_tblctoformapgto_opt_parcia on tblctoformapgto tblctoformapgto_3 (cost=0.43..0.72 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((lctano = tblancamento_3.lctano) AND (lctnumero = tblancamento_3.lctnumero))
  • Filter: (lfpsituacao = 1)
53. 0.000 0.000 ↓ 0.0

Index Scan using idx_lctoparcela_chave_formapgt on tblctoparcela tblctoparcela_3 (cost=0.56..0.68 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((lctano = tblctoformapgto_3.lctano) AND (lctnumero = tblctoformapgto_3.lctnumero) AND (fpcano = tblctoformapgto_3.fpcano) AND (fpccodigo = tblctoformapgto_3.fpccodigo) AND (lfpsequencia = tblctoformapgto_3.lfpsequencia))
  • Filter: (plcsituacao = 8)
54. 0.000 0.000 ↓ 0.0

Index Scan using idx_lctotributo_chave_lctoparc on tblctotributo tblctotributo_3 (cost=0.56..2.27 rows=1 width=41) (actual rows= loops=)

  • Index Cond: ((lctano = tblctoparcela_3.lctano) AND (lctnumero = tblctoparcela_3.lctnumero) AND (fpcano = tblctoparcela_3.fpcano) AND (fpccodigo = tblctoparcela_3.fpccodigo) AND (lfpsequencia = tblctoparcela_3.lfpsequencia) AND (plcparcela = tblctoparcela_3.plcparcela))
55. 0.000 0.000 ↓ 0.0

Subquery Scan on *SELECT* 5 (cost=10,390.54..10,390.56 rows=1 width=60) (actual rows= loops=)

  • Filter: ("*SELECT* 5".valory > '0'::numeric)
56. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,390.54..10,390.55 rows=1 width=42) (actual rows= loops=)

  • Group Key: 'Valor Pago'::text, origem_4.valorx
57. 0.000 0.000 ↓ 0.0

Subquery Scan on origem_4 (cost=10,390.25..10,390.27 rows=1 width=42) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

HashAggregate (cost=10,390.25..10,390.26 rows=1 width=27) (actual rows= loops=)

  • Group Key: date_part('year'::text, (tbdividaativa_4.divdatainscricao)::timestamp without time zone), tblctoformapgto_4.moecodigo
59. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.98..10,390.23 rows=1 width=27) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.41..10,389.32 rows=1 width=26) (actual rows= loops=)

  • Join Filter: ((tbdividaativa_4.lctnumero = tblctoparcela_4.lctnumero) AND (tbdividaativa_4.lctano = tblctoparcela_4.lctano))
61. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..10,365.76 rows=34 width=44) (actual rows= loops=)

  • Join Filter: ((tbdividaativa_4.lctnumero = tblctoformapgto_4.lctnumero) AND (tbdividaativa_4.lctano = tblctoformapgto_4.lctano))
62. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..10,313.73 rows=71 width=24) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Seq Scan on tbdividaativa tbdividaativa_4 (cost=0.00..8,037.15 rows=973 width=14) (actual rows= loops=)

  • Filter: ((date_part('year'::text, (divdatainscricao)::timestamp without time zone) >= '2000'::double precision) AND (date_part('year'::text, (divdatainscricao)::timestamp without time zone) <= '2019'::double precision))
64. 0.000 0.000 ↓ 0.0

Index Scan using pk_tblancamento_normatizado on tblancamento_normatizado tblancamento_4 (cost=0.43..2.33 rows=1 width=10) (actual rows= loops=)

  • Index Cond: ((lctano = tbdividaativa_4.lctano) AND (lctnumero = tbdividaativa_4.lctnumero))
  • Filter: (lcttipodebito = 2)
65. 0.000 0.000 ↓ 0.0

Index Scan using idx_tblctoformapgto_opt_parcia on tblctoformapgto tblctoformapgto_4 (cost=0.43..0.72 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((lctano = tblancamento_4.lctano) AND (lctnumero = tblancamento_4.lctnumero))
  • Filter: (lfpsituacao = 1)
66. 0.000 0.000 ↓ 0.0

Index Scan using idx_lctoparcela_chave_formapgt on tblctoparcela tblctoparcela_4 (cost=0.56..0.68 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((lctano = tblctoformapgto_4.lctano) AND (lctnumero = tblctoformapgto_4.lctnumero) AND (fpcano = tblctoformapgto_4.fpcano) AND (fpccodigo = tblctoformapgto_4.fpccodigo) AND (lfpsequencia = tblctoformapgto_4.lfpsequencia))
  • Filter: (plcsituacao = 1)
67. 0.000 0.000 ↓ 0.0

Index Scan using idx_lctotributo_chave_lctoparc on tblctotributo tblctotributo_4 (cost=0.56..0.89 rows=1 width=41) (actual rows= loops=)

  • Index Cond: ((lctano = tblctoparcela_4.lctano) AND (lctnumero = tblctoparcela_4.lctnumero) AND (fpcano = tblctoparcela_4.fpcano) AND (fpccodigo = tblctoparcela_4.fpccodigo) AND (lfpsequencia = tblctoparcela_4.lfpsequencia) AND (plcparcela = tblctoparcela_4.plcparcela))