explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dqyw

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

Unique (cost=998,966,874,835.22..1,003,949,701,140.33 rows=30,663,546,493 width=515) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=998,966,874,835.22..999,043,533,701.45 rows=30,663,546,493 width=515) (actual rows= loops=)

  • Sort Key: cid.descricao, cad.cep, cid.unidadefederacao, tipolog.sigla, log.descricao, bai.descricao, cad_1.numero, imob.complementolote, tipolog_1.sigla, log_1.descricao, bai_1.descricao, ende.numero, ende.complemento, cid_1.descricao, cid_1.unidad (...)
3. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=15,623,420.85..950,864,654,290.04 rows=30,663,546,493 width=515) (actual rows= loops=)

  • Hash Cond: (a.pessoa = pes_1.pessoa)
4. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=9,521,102.08..13,808,755.46 rows=42,501,495 width=456) (actual rows= loops=)

  • Hash Cond: ((c.exercicio = tlte.exercicio) AND (tit.idlogradourotestada = tlte.idlogradourotestada))
5. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=9,521,086.17..13,489,957.10 rows=42,501,495 width=454) (actual rows= loops=)

  • Hash Cond: ((cadimob.tipocadastro = tit.tipocadastro) AND (cadimob.cadastrogeral = tit.cadastrogeral))
6. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=9,521,071.52..13,171,181.18 rows=42,501,495 width=438) (actual rows= loops=)

  • Hash Cond: (((cadimob.distrito_descr)::text = (cond.distrito)::text) AND ((cadimob.setor_descr)::text = (cond.setor)::text) AND (cadimob.condominio = cond.condominio))
7. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=9,521,038.68..12,410,194.29 rows=42,501,495 width=428) (actual rows= loops=)

  • Hash Cond: (cad.codigoisencao = tic.isencao)
8. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=9,521,037.53..12,250,812.51 rows=42,501,495 width=399) (actual rows= loops=)

  • Hash Cond: (tcgm.codigoisencao = ti.isencao)
9. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=9,521,036.37..12,091,430.74 rows=42,501,495 width=370) (actual rows= loops=)

  • Hash Cond: ((imobaval.tipocadastro = cadimob.tipocadastro) AND (imobaval.cadastrogeral = cadimob.cadastrogeral))
10. 0.000 0.000 ↓ 0.0

Seq Scan on tribimobiliarioavaliacao imobaval (cost=0.00..5,801.85 rows=82,507 width=18) (actual rows= loops=)

  • Filter: (sequencia = 1::numeric)
11. 0.000 0.000 ↓ 0.0

Hash (cost=6,849,750.94..6,849,750.94 rows=42,501,495 width=363) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=3,245,424.66..6,849,750.94 rows=42,501,495 width=363) (actual rows= loops=)

  • Hash Cond: ((dm.entidade = td.entidade) AND (dm.exerciciodebito = td.exercicio) AND (dm.tipocadastro = td.tipocadastro) AND (dm.cadastrogeral = td.cadastrogeral) AND (dm.guiarecolhimento = td.gu (...)
13. 0.000 0.000 ↓ 0.0

Seq Scan on tribdebitomanual dm (cost=0.00..317.93 rows=13,993 width=39) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Hash (cost=66,113.28..66,113.28 rows=42,501,495 width=382) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=22,696.70..66,113.28 rows=42,501,495 width=382) (actual rows= loops=)

  • Hash Cond: (tcon.idcontencioso = td.idcontenciosoorigem)
16. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=2.37..16,256.33 rows=319,560 width=50) (actual rows= loops=)

  • Hash Cond: (tcgm.idmemoriacadastro = tcd.idmemoriacadastro)
17. 0.000 0.000 ↓ 0.0

Seq Scan on tribcadastrogeralmemoria tcgm (cost=0.00..11,517.63 rows=410,863 width=21) (actual rows= loops=)

18. 0.000 0.000 ↓ 0.0

Hash (cost=2.28..2.28 rows=7 width=34) (actual rows= loops=)

19. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=1.11..2.28 rows=7 width=34) (actual rows= loops=)

  • Hash Cond: (tcd.idcontencioso = tcon.idcontencioso)
20. 0.000 0.000 ↓ 0.0

Seq Scan on tribcontenciosodebito tcd (cost=0.00..1.07 rows=7 width=10) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Hash (cost=1.05..1.05 rows=5 width=29) (actual rows= loops=)

22. 0.000 0.000 ↓ 0.0

Seq Scan on tribcontencioso tcon (cost=0.00..1.05 rows=5 width=29) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Hash (cost=22,686.03..22,686.03 rows=665 width=353) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,180.90..22,686.03 rows=665 width=353) (actual rows= loops=)

  • Hash Cond: ((c.tipocadastro = bmissqn.tipocadastro) AND (c.cadastrogeral = bmissqn.cadastrogeral))
25. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,174.69..22,674.82 rows=665 width=348) (actual rows= loops=)

  • Hash Cond: ((c.tipocadastro = bmtaxloc.tipocadastro) AND (c.cadastrogeral = bmtaxloc.cadastrogeral))
26. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,168.48..22,663.61 rows=665 width=343) (actual rows= loops=)

  • Hash Cond: ((c.tipocadastro = bmrisco.tipocadastro) AND (c.cadastrogeral = bmrisco.cadastrogeral))
27. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4,162.27..22,652.40 rows=665 width=334) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,161.71..18,447.56 rows=665 width=336) (actual rows= loops=)

  • Hash Cond: ((bolterreno.modelo = modresp.modelo) AND (bolterreno.modelogrupo = modresp.modelogrupo) AND (bolterreno.modelocampo = modresp.modeloca (...)
29. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4,153.39..18,426.87 rows=665 width=340) (actual rows= loops=)

30. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=4,152.83..16,016.62 rows=665 width=320) (actual rows= loops=)

  • Hash Cond: ((cadimob.tipocadastro = testada.tipocadastro) AND (cadimob.cadastrogeral = testada.cadastrogeral))
31. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4,138.18..15,996.97 rows=665 width=302) (actual rows= loops=)

32. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=4,137.76..11,946.17 rows=665 width=276) (actual rows= loops=)

33. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=4,137.34..7,899.93 rows=665 width=229) (actual rows= loops=)

  • Hash Cond: ((imobempr.tipocadastro = cadmob.tipocadastroimobiliario) AND (imobempr.cadastrogeral = cadmob.cadastroge (...)
34. 0.000 0.000 ↓ 0.0

Seq Scan on tribcadastroimobiliario imobempr (cost=0.00..3,141.76 rows=82,776 width=15) (actual rows= loops=)

35. 0.000 0.000 ↓ 0.0

Hash (cost=4,127.36..4,127.36 rows=665 width=236) (actual rows= loops=)

36. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=2,450.28..4,127.36 rows=665 width=236) (actual rows= loops=)

  • Hash Cond: ((cad.tipocadastro = cadmob.tipocadastro) AND (cad.cadastrogeral = cadmob.cadastrogeral))
37. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=563.78..2,222.26 rows=665 width=220) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=556.45..859.87 rows=30 width=163) (actual rows= loops=)

  • -> Index Scan using xpktribcadastrogeral on tribcadastrogeral cad (cost=0.42..6.08 rows=1 (...)
39. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=556.03..677.12 rows=30 width=124) (actual rows= loops=)

  • Join Filter: ((carnebloq.entidade = carne.entidade) AND (carnebloq.exercicio = carne.e (...)
  • -> Index Scan using xpktribcarne on tribcarne carne (cost=0.42..8.44 rows=1 width=31 (...)
  • Index Cond: ((entidade = 1::numeric) AND (exercicio = 2019::numeric) AND (carne (...)
  • Index Cond: ((c.tipocadastro = tipocadastro) AND (c.cadastrogeral = cadastrogeral))
40. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=555.61..668.15 rows=30 width=119) (actual rows= loops=)

  • Hash Cond: ((guia.entidade = tgrec.entidade) AND (guia.exercicio = tgrec.exercic (...)
41. 0.000 0.000 ↓ 0.0

Seq Scan on tribguiarecolhimento guia (cost=0.00..78.76 rows=2,976 width=20) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Hash (cost=555.08..555.08 rows=30 width=129) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.71..555.08 rows=30 width=129) (actual rows= loops=)

  • -> Index Only Scan using xpktribcarnebloqueto on tribcarnebloqueto (...)
  • Index Cond: ((entidade = 1::numeric) AND (exercicio = 2019::nu (...)
44. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=2.28..76.53 rows=4 width=113) (actual rows= loops=)

  • -> Index Only Scan using idx_guiarecolhimentoreceita on tribg (...)
45. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.99..64.05 rows=4 width=103) (actual rows= loops=)

  • -> Nested Loop Left Join (cost=1.56..39.49 rows=4 widt (...)
  • -> Nested Loop Left Join (cost=1.00..13.32 rows= (...)
  • -> Index Scan using xpktribbloqueto on trib (...)
  • Index Cond: ((entidade = carnebloq.ent (...)
  • -> Index Only Scan using xpktribbloquetodeb (...)
  • Index Cond: ((entidade = a.entidade) A (...)
  • -> Index Scan using tribdebitoparcelareceita_uktr (...)
  • Index Cond: (b.iddebitoparcelareceita = idde (...)
  • -> Index Scan using tribdebito_idx_debitonina on tribde (...)
  • Index Cond: ((c.exercicio = exercicio) AND (c.cada (...)
  • Filter: ((c.entidade = entidade) AND (c.tipocadast (...)
  • Index Cond: ((entidade = c.entidade) AND (exercicio = c. (...)
46. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=7.33..44.98 rows=43 width=68) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.40..23.90 rows=11 width=55) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.12..18.08 rows=1 width=48) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.84..12.17 rows=1 width=33) (actual rows= loops=)

  • -> Index Scan using xpktribcadastrogeral on tribcadastrogeral cad_1 (cos (...)
  • Index Cond: ((cad.tipocadastro = tipocadastro) AND (cad.cadastrogera (...)
  • -> Index Scan using xpktribcadastroimobiliario on tribcadastroimobiliario (...)
  • Index Cond: ((cad_1.tipocadastro = tipocadastro) AND (cad_1.cadastro (...)
50. 0.000 0.000 ↓ 0.0

Index Scan using xpkcidade on cidade cid (cost=0.28..5.89 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (cad_1.cidade = cidade)
51. 0.000 0.000 ↓ 0.0

Index Scan using xpkbairro on bairro bai (cost=0.28..5.81 rows=1 width=23) (actual rows= loops=)

  • Index Cond: ((cad_1.cidade = cidade) AND (cad_1.bairro = bairro))
52. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=5.93..7.30 rows=1 width=34) (actual rows= loops=)

  • Hash Cond: (tipolog.tipologradouro = log.tipologradouro)
53. 0.000 0.000 ↓ 0.0

Seq Scan on tipologradouro tipolog (cost=0.00..1.26 rows=26 width=8) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Hash (cost=5.92..5.92 rows=1 width=36) (actual rows= loops=)

  • -> Index Scan using xpklogradouro on logradouro log (cost=0.29..5.92 rows=1 wi (...)
  • Index Cond: ((cad_1.cidade = cidade) AND (cad_1.logradouro = logradouro))
55. 0.000 0.000 ↓ 0.0

Hash (cost=1,334.20..1,334.20 rows=36,820 width=27) (actual rows= loops=)

56. 0.000 0.000 ↓ 0.0

Seq Scan on tribcadastromobiliario cadmob (cost=0.00..1,334.20 rows=36,820 width=27) (actual rows= loops=)

57. 0.000 0.000 ↓ 0.0

Index Scan using xpktribcadastroimobiliario on tribcadastroimobiliario cadimob (cost=0.42..6.07 rows=1 width=58) (actual rows= loops=)

  • Index Cond: ((cad.tipocadastro = tipocadastro) AND (cad.cadastrogeral = cadastrogeral))
58. 0.000 0.000 ↓ 0.0

Index Scan using idxpessoa_endereco on pessoa pes (cost=0.42..6.08 rows=1 width=32) (actual rows= loops=)

  • Index Cond: (pessoa = a.pessoa)
59. 0.000 0.000 ↓ 0.0

Hash (cost=14.63..14.63 rows=2 width=50) (actual rows= loops=)

60. 0.000 0.000 ↓ 0.0

Seq Scan on tribimobiliariotestada testada (cost=0.00..14.63 rows=2 width=50) (actual rows= loops=)

  • Filter: (principal = 'S'::bpchar)
61. 0.000 0.000 ↓ 0.0

Index Only Scan using xpktribboletimimobiliarioterre on tribboletimimobiliarioterreno bolterreno (cost=0.56..3.61 rows=1 width=31) (actual rows= loops=)

  • Index Cond: ((tipocadastro = cadimob.tipocadastro) AND (cadastrogeral = cadimob.cadastrogeral) AND (modelo = 1::numeric) AND (modelogr (...)
62. 0.000 0.000 ↓ 0.0

Hash (cost=8.30..8.30 rows=1 width=35) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Index Scan using xpktribmodeloresposta on tribmodeloresposta modresp (cost=0.28..8.30 rows=1 width=35) (actual rows= loops=)

  • Index Cond: ((modelo = 1::numeric) AND (modelogrupo = 1::numeric) AND (modelocampo = 10::numeric))
64. 0.000 0.000 ↓ 0.0

Index Scan using xif3tribdebitoreceita on tribdebitoreceita tdr (cost=0.56..6.31 rows=1 width=32) (actual rows= loops=)

  • Index Cond: ((c.entidade = entidade) AND (c.exercicio = exercicio) AND (c.tipocadastro = tipocadastro) AND (c.cadastrogeral = cadastrogeral) AND ( (...)
  • Filter: (valorbasecalculo > 0::numeric)
65. 0.000 0.000 ↓ 0.0

Hash (cost=6.20..6.20 rows=1 width=20) (actual rows= loops=)

66. 0.000 0.000 ↓ 0.0

Index Scan using xif1tribboletimmobiliario on tribboletimmobiliario bmrisco (cost=0.42..6.20 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((modelo = 2::numeric) AND (modelogrupo = 1::numeric) AND (modelocampo = 12::numeric))
67. 0.000 0.000 ↓ 0.0

Hash (cost=6.20..6.20 rows=1 width=16) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Index Scan using xif1tribboletimmobiliario on tribboletimmobiliario bmtaxloc (cost=0.42..6.20 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((modelo = 2::numeric) AND (modelogrupo = 1::numeric) AND (modelocampo = 7::numeric))
69. 0.000 0.000 ↓ 0.0

Hash (cost=6.20..6.20 rows=1 width=16) (actual rows= loops=)

70. 0.000 0.000 ↓ 0.0

Index Scan using xif1tribboletimmobiliario on tribboletimmobiliario bmissqn (cost=0.42..6.20 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((modelo = 2::numeric) AND (modelogrupo = 1::numeric) AND (modelocampo = 3::numeric))
71. 0.000 0.000 ↓ 0.0

Hash (cost=1.07..1.07 rows=7 width=33) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

Seq Scan on tribisencao ti (cost=0.00..1.07 rows=7 width=33) (actual rows= loops=)

73. 0.000 0.000 ↓ 0.0

Hash (cost=1.07..1.07 rows=7 width=33) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Seq Scan on tribisencao tic (cost=0.00..1.07 rows=7 width=33) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Hash (cost=18.94..18.94 rows=794 width=25) (actual rows= loops=)

76. 0.000 0.000 ↓ 0.0

Seq Scan on tribcondominio cond (cost=0.00..18.94 rows=794 width=25) (actual rows= loops=)

77. 0.000 0.000 ↓ 0.0

Hash (cost=14.63..14.63 rows=2 width=48) (actual rows= loops=)

78. 0.000 0.000 ↓ 0.0

Seq Scan on tribimobiliariotestada tit (cost=0.00..14.63 rows=2 width=48) (actual rows= loops=)

  • Filter: (principal = 'S'::bpchar)
79. 0.000 0.000 ↓ 0.0

Hash (cost=15.88..15.88 rows=2 width=50) (actual rows= loops=)

80. 0.000 0.000 ↓ 0.0

Seq Scan on triblogradourotestadaexercicio tlte (cost=0.00..15.88 rows=2 width=50) (actual rows= loops=)

  • Filter: (principal = 'S'::bpchar)
81. 0.000 0.000 ↓ 0.0

Hash (cost=3,138,793.64..3,138,793.64 rows=122,364,891 width=71) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Merge Right Join (cost=985,703.92..3,138,793.64 rows=122,364,891 width=71) (actual rows= loops=)

  • Merge Cond: ((log_1.logradouro = ende.logradouro) AND (log_1.cidade = ende.cidade))
83. 0.000 0.000 ↓ 0.0

Sort (cost=3,548.14..3,628.64 rows=32,200 width=34) (actual rows= loops=)

  • Sort Key: log_1.logradouro, log_1.cidade
84. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=1.59..1,137.20 rows=32,200 width=34) (actual rows= loops=)

  • Hash Cond: (log_1.tipologradouro = tipolog_1.tipologradouro)
85. 0.000 0.000 ↓ 0.0

Seq Scan on logradouro log_1 (cost=0.00..696.00 rows=32,200 width=36) (actual rows= loops=)

86. 0.000 0.000 ↓ 0.0

Hash (cost=1.26..1.26 rows=26 width=8) (actual rows= loops=)

87. 0.000 0.000 ↓ 0.0

Seq Scan on tipologradouro tipolog_1 (cost=0.00..1.26 rows=26 width=8) (actual rows= loops=)

88. 0.000 0.000 ↓ 0.0

Materialize (cost=982,155.75..1,005,081.93 rows=4,585,235 width=58) (actual rows= loops=)

89. 0.000 0.000 ↓ 0.0

Sort (cost=982,155.75..993,618.84 rows=4,585,235 width=58) (actual rows= loops=)

  • Sort Key: ende.logradouro, ende.cidade
90. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=48,659.17..130,040.42 rows=4,585,235 width=58) (actual rows= loops=)

  • Merge Cond: ((ende.cidade = bai_1.cidade) AND (ende.bairro = bai_1.bairro))
91. 0.000 0.000 ↓ 0.0

Sort (cost=48,139.26..48,563.27 rows=169,605 width=51) (actual rows= loops=)

  • Sort Key: ende.cidade, ende.bairro
92. 0.000 0.000 ↓ 0.0

Hash Left Join (cost=12,006.20..27,608.03 rows=169,605 width=51) (actual rows= loops=)

  • Hash Cond: (ende.cidade = cid_1.cidade)
93. 0.000 0.000 ↓ 0.0

Hash Right Join (cost=11,790.13..23,999.85 rows=169,605 width=36) (actual rows= loops=)

  • Hash Cond: ((ende.pessoa = pes_1.pessoa) AND (ende.sequencia = pes_1.sequenciaendereco))
94. 0.000 0.000 ↓ 0.0

Seq Scan on enderecopessoa ende (cost=0.00..3,774.55 rows=169,355 width=41) (actual rows= loops=)

95. 0.000 0.000 ↓ 0.0

Hash (cost=8,417.05..8,417.05 rows=169,605 width=11) (actual rows= loops=)

96. 0.000 0.000 ↓ 0.0

Seq Scan on pessoa pes_1 (cost=0.00..8,417.05 rows=169,605 width=11) (actual rows= loops=)

97. 0.000 0.000 ↓ 0.0

Hash (cost=136.59..136.59 rows=6,359 width=20) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

Seq Scan on cidade cid_1 (cost=0.00..136.59 rows=6,359 width=20) (actual rows= loops=)

99. 0.000 0.000 ↓ 0.0

Sort (cost=463.70..477.99 rows=5,714 width=23) (actual rows= loops=)

  • Sort Key: bai_1.cidade, bai_1.bairro
100. 0.000 0.000 ↓ 0.0

Seq Scan on bairro bai_1 (cost=0.00..107.14 rows=5,714 width=23) (actual rows= loops=)

101.          

SubPlan (forHash Left Join)

102. 0.000 0.000 ↓ 0.0

Aggregate (cost=8.17..8.18 rows=1 width=18) (actual rows= loops=)

103. 0.000 0.000 ↓ 0.0

Index Scan using sys_c001029501 on tribimobiliarioareaverde tiav (cost=0.15..8.17 rows=1 width=18) (actual rows= loops=)

  • Index Cond: ((tipocadastro = cadimob.tipocadastro) AND (cadastrogeral = cadimob.cadastrogeral))
104. 0.000 0.000 ↓ 0.0

Aggregate (cost=22.79..22.80 rows=1 width=4) (actual rows= loops=)

105. 0.000 0.000 ↓ 0.0

Index Scan using xif1tribbloquetodebito on tribbloquetodebito b1 (cost=0.56..22.77 rows=9 width=4) (actual rows= loops=)

  • Index Cond: ((entidade = a.entidade) AND (exerciciobloqueto = a.exerciciobloqueto) AND (bloqueto = a.bloqueto))