explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Xxa2

Settings
# exclusive inclusive rows x rows loops node
1. 56.744 10,869.440 ↓ 2,611.0 2,611 1

Sort (cost=1,132,263.58..1,132,263.58 rows=1 width=342) (actual time=10,868.629..10,869.440 rows=2,611 loops=1)

  • Sort Key: unidadeensino.nome, curso.nome, turma.identificadorturma, pessoa.nome, parceiro.nome, contareceber.datavencimento, crr.contareceber
  • Sort Method: quicksort Memory: 1443kB
2. 14.833 10,812.696 ↓ 2,611.0 2,611 1

HashAggregate (cost=1,132,263.56..1,132,263.57 rows=1 width=342) (actual time=10,809.112..10,812.696 rows=2,611 loops=1)

  • Group Key: curso.nome, turma.identificadorturma, pessoa.nome, parceiro.nome, negociacaorecebimento.tipopessoa, negociacaorecebimento.data, negociacaorecebimento.observacao, contareceber.tipoorigem, contareceber.nrdocumento, contareceber.valor, contareceber.valordesconto, contareceber.parcela, contareceber.valorindicereajusteporatraso, contareceber.valorreajustediferencaparcelarecebidaouenviadaremessa, contareceber.valordescontocalculadoprimeirafaixadescontos, contareceber.valordescontorecebido, contareceber.valormultacalculado, contareceber.valorjurocalculado, banco.nome, contacorrente.numero, contacorrente.digito, (negociacaorecebimento.data)::date, formapagamento.tipo, contareceber.nossonumero, contareceber.datavencimento, unidadeensino.nome, crr.contareceber, contareceber.valordesconto, contareceber.valordescontoalunojacalculado, contareceber.valorcalculadodescontolancadorecebimento, contareceber.descontoinstituicao, contareceber.descontoconvenio, contareceber.valordescontoprogressivo, contareceber.valordescontorateio, turma.tipochancela, turma.valorfixochancela, turma.porcentagemchancela, turma.valorporaluno, matricula.descontochancela, chancela.instituicaochanceladora, crr.valorrecebimento, p2.nome, formapagamentonegociacaorecebimento.codigo, contacorrente.nomeapresentacaosistema, contareceber.acrescimo
3. 3.723 10,797.863 ↓ 2,611.0 2,611 1

Nested Loop Left Join (cost=1,127,882.16..1,132,263.44 rows=1 width=342) (actual time=10,408.017..10,797.863 rows=2,611 loops=1)

4. 2.789 10,791.529 ↓ 2,611.0 2,611 1

Nested Loop Left Join (cost=1,127,882.03..1,132,263.28 rows=1 width=341) (actual time=10,408.010..10,791.529 rows=2,611 loops=1)

5. 3.980 10,780.907 ↓ 2,611.0 2,611 1

Nested Loop Left Join (cost=1,127,881.61..1,132,262.42 rows=1 width=320) (actual time=10,408.003..10,780.907 rows=2,611 loops=1)

6. 4.263 10,776.927 ↓ 2,611.0 2,611 1

Nested Loop Left Join (cost=1,127,881.33..1,132,262.12 rows=1 width=289) (actual time=10,407.999..10,776.927 rows=2,611 loops=1)

7. 3.600 10,756.998 ↓ 2,611.0 2,611 1

Nested Loop Left Join (cost=1,127,880.91..1,132,261.63 rows=1 width=268) (actual time=10,407.987..10,756.998 rows=2,611 loops=1)

8. 5.632 10,745.565 ↓ 2,611.0 2,611 1

Nested Loop Left Join (cost=1,127,880.64..1,132,261.33 rows=1 width=224) (actual time=10,407.977..10,745.565 rows=2,611 loops=1)

9. 3.202 10,721.656 ↓ 2,611.0 2,611 1

Nested Loop Left Join (cost=1,127,877.98..1,132,254.63 rows=1 width=209) (actual time=10,407.954..10,721.656 rows=2,611 loops=1)

  • Join Filter: ((matricula.matricula)::text = (matriculaperiodo.matricula)::text)
10. 4.066 10,702.788 ↓ 2,611.0 2,611 1

Nested Loop Left Join (cost=1,127,877.56..1,132,254.18 rows=1 width=222) (actual time=10,407.938..10,702.788 rows=2,611 loops=1)

11. 2.224 10,670.001 ↓ 2,611.0 2,611 1

Nested Loop Left Join (cost=1,127,877.14..1,132,253.72 rows=1 width=213) (actual time=10,407.915..10,670.001 rows=2,611 loops=1)

12. 4.257 10,662.555 ↓ 2,611.0 2,611 1

Nested Loop Left Join (cost=1,127,877.00..1,132,253.55 rows=1 width=201) (actual time=10,407.908..10,662.555 rows=2,611 loops=1)

13. 181.497 10,653.076 ↓ 2,611.0 2,611 1

Nested Loop (cost=1,127,876.72..1,132,253.24 rows=1 width=201) (actual time=10,407.897..10,653.076 rows=2,611 loops=1)

  • Join Filter: (formapagamentonegociacaorecebimento.contacorrente = contacorrente.codigo)
  • Rows Removed by Join Filter: 355096
14. 0.669 0.669 ↑ 85.3 137 1

Index Scan using ch_contacorrente_agencia on contacorrente (cost=0.29..3,743.44 rows=11,687 width=47) (actual time=0.009..0.669 rows=137 loops=1)

15. 69.764 10,470.910 ↓ 2,611.0 2,611 137

Materialize (cost=1,127,876.44..1,128,334.49 rows=1 width=162) (actual time=75.434..76.430 rows=2,611 loops=137)

16. 3.371 10,401.146 ↓ 2,611.0 2,611 1

Nested Loop (cost=1,127,876.44..1,128,334.49 rows=1 width=162) (actual time=10,334.400..10,401.146 rows=2,611 loops=1)

17. 2.966 10,395.164 ↓ 2,611.0 2,611 1

Nested Loop (cost=1,127,876.30..1,128,334.32 rows=1 width=163) (actual time=10,334.393..10,395.164 rows=2,611 loops=1)

18. 3.225 10,384.365 ↓ 2,611.0 2,611 1

Nested Loop (cost=1,127,875.87..1,128,333.84 rows=1 width=155) (actual time=10,334.381..10,384.365 rows=2,611 loops=1)

19. 2.032 10,373.307 ↓ 2,611.0 2,611 1

Nested Loop (cost=1,127,875.45..1,128,333.36 rows=1 width=147) (actual time=10,334.369..10,373.307 rows=2,611 loops=1)

20. 5.415 10,366.053 ↓ 2,611.0 2,611 1

Nested Loop (cost=1,127,875.30..1,128,333.18 rows=1 width=135) (actual time=10,334.360..10,366.053 rows=2,611 loops=1)

21. 1.294 10,347.583 ↓ 2,611.0 2,611 1

Nested Loop (cost=1,127,874.87..1,128,332.49 rows=1 width=24) (actual time=10,334.344..10,347.583 rows=2,611 loops=1)

22. 3.732 10,335.865 ↓ 48.3 2,606 1

HashAggregate (cost=1,127,874.44..1,127,874.98 rows=54 width=20) (actual time=10,334.325..10,335.865 rows=2,606 loops=1)

  • Group Key: t.formapagamentonegociacaorecebimento, t.negociacaorecebimento, t.datacompensacao
23. 1.126 10,332.133 ↓ 4.9 2,606 1

Subquery Scan on t (cost=38.90..1,127,869.11 rows=533 width=20) (actual time=4.281..10,332.133 rows=2,606 loops=1)

  • Filter: ((t.datacompensacao >= '2019-01-10 00:00:00-02'::timestamp with time zone) AND (t.datacompensacao <= '2019-01-10 23:59:59.059-02'::timestamp with time zone))
24. 0.806 10,331.007 ↑ 40.9 2,606 1

Append (cost=38.90..1,126,270.20 rows=106,594 width=28) (actual time=4.280..10,331.007 rows=2,606 loops=1)

25. 0.000 0.228 ↓ 0.0 0 1

Subquery Scan on *SELECT* 1 (cost=38.90..58.98 rows=2 width=29) (actual time=0.228..0.228 rows=0 loops=1)

26. 0.000 0.228 ↓ 0.0 0 1

Nested Loop (cost=38.90..58.96 rows=2 width=29) (actual time=0.228..0.228 rows=0 loops=1)

27. 0.002 0.228 ↓ 0.0 0 1

Merge Join (cost=38.47..58.02 rows=2 width=29) (actual time=0.228..0.228 rows=0 loops=1)

  • Merge Cond: (fpnr.cheque = cheque.codigo)
28. 0.010 0.010 ↑ 1,554,429.0 1 1

Index Scan using ch_formapagamentonegociacaorecebimento_cheque on formapagamentonegociacaorecebimento fpnr (cost=0.43..54,685.86 rows=1,554,429 width=16) (actual time=0.010..0.010 rows=1 loops=1)

29. 0.006 0.216 ↓ 0.0 0 1

Sort (cost=38.04..38.05 rows=3 width=21) (actual time=0.216..0.216 rows=0 loops=1)

  • Sort Key: cheque.codigo
  • Sort Method: quicksort Memory: 25kB
30. 0.210 0.210 ↓ 0.0 0 1

Seq Scan on cheque (cost=0.00..38.02 rows=3 width=21) (actual time=0.210..0.210 rows=0 loops=1)

  • Filter: ((CASE WHEN (pago AND (databaixa IS NOT NULL)) THEN databaixa ELSE dataprevisao END >= '2019-01-10 00:00:00'::timestamp without time zone) AND (CASE WHEN (pago AND (databaixa IS NOT NULL)) THEN databaixa ELSE dataprevisao END <= '2019-01-10 23:59:59.059'::timestamp without time zone))
  • Rows Removed by Filter: 668
31. 0.000 0.000 ↓ 0.0 0

Index Only Scan using negociacaorecebimento_pkey on negociacaorecebimento nr (cost=0.43..0.46 rows=1 width=4) (never executed)

  • Index Cond: (codigo = fpnr.negociacaorecebimento)
  • Heap Fetches: 0
32. 0.001 0.006 ↓ 0.0 0 1

Nested Loop (cost=1.14..17.24 rows=1 width=31) (actual time=0.006..0.006 rows=0 loops=1)

33. 0.001 0.005 ↓ 0.0 0 1

Nested Loop (cost=0.71..16.77 rows=1 width=31) (actual time=0.005..0.005 rows=0 loops=1)

34. 0.004 0.004 ↓ 0.0 0 1

Index Scan using idx_formapagamentonegociacaorecebimentocartaocredito_formapagam on formapagamentonegociacaorecebimentocartaocredito fpnrcc (cost=0.28..8.31 rows=1 width=27) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (formapagamentonegociacaorecebimento IS NOT NULL)
  • Filter: ((CASE WHEN (((situacao)::text = 'RE'::text) AND (datarecebimento IS NOT NULL)) THEN datarecebimento ELSE datavencimento END >= '2019-01-10 00:00:00-02'::timestamp with time zone) AND (CASE WHEN (((situacao)::text = 'RE'::text) AND (datarecebimento IS NOT NULL)) THEN datarecebimento ELSE datavencimento END <= '2019-01-10 23:59:59.059-02'::timestamp with time zone))
35. 0.000 0.000 ↓ 0.0 0

Index Scan using formapagamentonegociacaorecebimento_pkey on formapagamentonegociacaorecebimento fpnr_1 (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (codigo = fpnrcc.formapagamentonegociacaorecebimento)
36. 0.000 0.000 ↓ 0.0 0

Index Only Scan using negociacaorecebimento_pkey on negociacaorecebimento nr_1 (cost=0.43..0.46 rows=1 width=4) (never executed)

  • Index Cond: (codigo = fpnr_1.negociacaorecebimento)
  • Heap Fetches: 0
37. 0.039 4.195 ↓ 14.0 14 1

Nested Loop (cost=148.14..173.08 rows=1 width=31) (actual time=4.044..4.195 rows=14 loops=1)

38. 0.369 4.114 ↓ 14.0 14 1

Merge Join (cost=147.71..169.72 rows=1 width=31) (actual time=4.006..4.114 rows=14 loops=1)

  • Merge Cond: (fpnr_2.formapagamentonegociacaorecebimentocartaocredito = fpnrcc_1.codigo)
39. 0.587 0.587 ↑ 2.8 1,181 1

Index Scan using idx_formapagamentonegociacaorecebimento_formapgnegcartaocredito on formapagamentonegociacaorecebimento fpnr_2 (cost=0.43..10,203.99 rows=3,264 width=12) (actual time=0.038..0.587 rows=1,181 loops=1)

  • Index Cond: (formapagamentonegociacaorecebimentocartaocredito IS NOT NULL)
40. 0.018 3.158 ↑ 1.5 14 1

Sort (cost=147.28..147.33 rows=21 width=27) (actual time=3.154..3.158 rows=14 loops=1)

  • Sort Key: fpnrcc_1.codigo
  • Sort Method: quicksort Memory: 26kB
41. 3.140 3.140 ↑ 1.5 14 1

Seq Scan on formapagamentonegociacaorecebimentocartaocredito fpnrcc_1 (cost=0.00..146.82 rows=21 width=27) (actual time=0.333..3.140 rows=14 loops=1)

  • Filter: ((formapagamentonegociacaorecebimento IS NULL) AND (CASE WHEN (((situacao)::text = 'RE'::text) AND (datarecebimento IS NOT NULL)) THEN datarecebimento ELSE datavencimento END >= '2019-01-10 00:00:00-02'::timestamp with time zone) AND (CASE WHEN (((situacao)::text = 'RE'::text) AND (datarecebimento IS NOT NULL)) THEN datarecebimento ELSE datavencimento END <= '2019-01-10 23:59:59.059-02'::timestamp with time zone))
  • Rows Removed by Filter: 4247
42. 0.042 0.042 ↑ 1.0 1 14

Index Only Scan using negociacaorecebimento_pkey on negociacaorecebimento nr_2 (cost=0.43..3.35 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=14)

  • Index Cond: (codigo = fpnr_2.negociacaorecebimento)
  • Heap Fetches: 0
43. 2.135 1,196.861 ↑ 14,393.0 1 1

Hash Join (cost=56,031.43..77,038.66 rows=14,393 width=28) (actual time=1,196.751..1,196.861 rows=1 loops=1)

  • Hash Cond: (fpnr_3.negociacaorecebimento = nr_3.codigo)
  • Join Filter: ((CASE WHEN (fpnr_3.datacredito IS NOT NULL) THEN (fpnr_3.datacredito)::timestamp with time zone ELSE nr_3.data END >= '2019-01-10 00:00:00-02'::timestamp with time zone) AND (CASE WHEN (fpnr_3.datacredito IS NOT NULL) THEN (fpnr_3.datacredito)::timestamp with time zone ELSE nr_3.data END <= '2019-01-10 23:59:59.059-02'::timestamp with time zone))
  • Rows Removed by Join Filter: 627
44. 0.307 0.734 ↑ 206.3 628 1

Nested Loop (cost=0.43..17,085.59 rows=129,536 width=20) (actual time=0.018..0.734 rows=628 loops=1)

45. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on formapagamento fp (cost=0.00..1.15 rows=1 width=4) (actual time=0.005..0.009 rows=1 loops=1)

  • Filter: ((tipo)::text = 'CD'::text)
  • Rows Removed by Filter: 11
46. 0.418 0.418 ↑ 225.0 628 1

Index Scan using ch_formapagamentonegociacaorecebimento_formapagamento on formapagamentonegociacaorecebimento fpnr_3 (cost=0.43..15,671.32 rows=141,312 width=24) (actual time=0.011..0.418 rows=628 loops=1)

  • Index Cond: (formapagamento = fp.codigo)
47. 628.099 1,193.992 ↓ 1.0 1,562,429 1

Hash (cost=36,642.67..36,642.67 rows=1,551,067 width=12) (actual time=1,193.992..1,193.992 rows=1,562,429 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 73239kB
48. 565.893 565.893 ↓ 1.0 1,562,429 1

Seq Scan on negociacaorecebimento nr_3 (cost=0.00..36,642.67 rows=1,551,067 width=12) (actual time=0.005..565.893 rows=1,562,429 loops=1)

49. 2,318.630 4,782.700 ↑ 5.8 2,489 1

Hash Join (cost=56,031.43..77,038.66 rows=14,393 width=28) (actual time=1,215.420..4,782.700 rows=2,489 loops=1)

  • Hash Cond: (fpnr_4.negociacaorecebimento = nr_4.codigo)
  • Join Filter: ((CASE WHEN (fpnr_4.datacredito IS NOT NULL) THEN (fpnr_4.datacredito)::timestamp with time zone ELSE nr_4.data END >= '2019-01-10 00:00:00-02'::timestamp with time zone) AND (CASE WHEN (fpnr_4.datacredito IS NOT NULL) THEN (fpnr_4.datacredito)::timestamp with time zone ELSE nr_4.data END <= '2019-01-10 23:59:59.059-02'::timestamp with time zone))
  • Rows Removed by Join Filter: 1496299
50. 675.361 1,318.534 ↓ 11.6 1,498,788 1

Nested Loop (cost=0.43..17,085.59 rows=129,536 width=20) (actual time=0.019..1,318.534 rows=1,498,788 loops=1)

51. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on formapagamento fp_1 (cost=0.00..1.15 rows=1 width=4) (actual time=0.004..0.008 rows=1 loops=1)

  • Filter: ((tipo)::text = 'BO'::text)
  • Rows Removed by Filter: 11
52. 643.165 643.165 ↓ 10.6 1,498,788 1

Index Scan using ch_formapagamentonegociacaorecebimento_formapagamento on formapagamentonegociacaorecebimento fpnr_4 (cost=0.43..15,671.32 rows=141,312 width=24) (actual time=0.010..643.165 rows=1,498,788 loops=1)

  • Index Cond: (formapagamento = fp_1.codigo)
53. 592.297 1,145.536 ↓ 1.0 1,562,429 1

Hash (cost=36,642.67..36,642.67 rows=1,551,067 width=12) (actual time=1,145.536..1,145.536 rows=1,562,429 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 73239kB
54. 553.239 553.239 ↓ 1.0 1,562,429 1

Seq Scan on negociacaorecebimento nr_4 (cost=0.00..36,642.67 rows=1,551,067 width=12) (actual time=0.005..553.239 rows=1,562,429 loops=1)

55. 0.693 4,346.211 ↑ 762.8 102 1

Hash Join (cost=56,032.31..970,877.65 rows=77,804 width=28) (actual time=4,056.388..4,346.211 rows=102 loops=1)

  • Hash Cond: (fpnr_5.formapagamento = fp_2.codigo)
  • Join Filter: (((fp_2.tipo)::text <> ALL ('{CD,CA,CH,BO}'::text[])) OR (((fp_2.tipo)::text = 'CA'::text) AND (fpnr_5.formapagamentonegociacaorecebimentocartaocredito IS NULL) AND (NOT (SubPlan 1))))
  • Rows Removed by Join Filter: 25
56. 2,829.611 4,345.501 ↑ 66.0 2,617 1

Hash Join (cost=56,031.01..131,794.17 rows=172,714 width=36) (actual time=4,056.342..4,345.501 rows=2,617 loops=1)

  • Hash Cond: (fpnr_5.negociacaorecebimento = nr_5.codigo)
  • Join Filter: ((CASE WHEN (fpnr_5.datacredito IS NOT NULL) THEN (fpnr_5.datacredito)::timestamp with time zone ELSE nr_5.data END >= '2019-01-10 00:00:00-02'::timestamp with time zone) AND (CASE WHEN (fpnr_5.datacredito IS NOT NULL) THEN (fpnr_5.datacredito)::timestamp with time zone ELSE nr_5.data END <= '2019-01-10 23:59:59.059-02'::timestamp with time zone))
  • Rows Removed by Join Filter: 1563234
57. 356.206 356.206 ↓ 1.0 1,565,851 1

Seq Scan on formapagamentonegociacaorecebimento fpnr_5 (cost=0.00..29,130.29 rows=1,554,429 width=28) (actual time=0.003..356.206 rows=1,565,851 loops=1)

58. 603.315 1,159.684 ↓ 1.0 1,562,429 1

Hash (cost=36,642.67..36,642.67 rows=1,551,067 width=12) (actual time=1,159.684..1,159.684 rows=1,562,429 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 73239kB
59. 556.369 556.369 ↓ 1.0 1,562,429 1

Seq Scan on negociacaorecebimento nr_5 (cost=0.00..36,642.67 rows=1,551,067 width=12) (actual time=0.006..556.369 rows=1,562,429 loops=1)

60. 0.004 0.017 ↓ 1.3 9 1

Hash (cost=1.21..1.21 rows=7 width=7) (actual time=0.017..0.017 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
61. 0.013 0.013 ↓ 1.3 9 1

Seq Scan on formapagamento fp_2 (cost=0.00..1.21 rows=7 width=7) (actual time=0.007..0.013 rows=9 loops=1)

  • Filter: (((tipo)::text <> ALL ('{CD,CA,CH,BO}'::text[])) OR ((tipo)::text = 'CA'::text))
  • Rows Removed by Filter: 3
62.          

SubPlan (forHash Join)

63. 0.000 0.000 ↓ 0.0 0

Limit (cost=0.28..8.30 rows=1 width=4) (never executed)

64. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_formapagamentonegociacaorecebimentocartaocredito_formapagam on formapagamentonegociacaorecebimentocartaocredito fpnrcc_2 (cost=0.28..8.30 rows=1 width=4) (never executed)

  • Index Cond: ((formapagamentonegociacaorecebimento IS NOT NULL) AND (formapagamentonegociacaorecebimento = fpnr_5.codigo))
65. 10.424 10.424 ↑ 1.0 1 2,606

Index Scan using contareceberrecebimento_formacontareceber on contareceberrecebimento crr (cost=0.43..8.45 rows=1 width=16) (actual time=0.003..0.004 rows=1 loops=2,606)

  • Index Cond: (formapagamentonegociacaorecebimento = t.formapagamentonegociacaorecebimento)
  • Filter: (t.negociacaorecebimento = negociacaorecebimento)
66. 13.055 13.055 ↑ 1.0 1 2,611

Index Scan using contareceber_pkey on contareceber (cost=0.43..0.67 rows=1 width=115) (actual time=0.005..0.005 rows=1 loops=2,611)

  • Index Cond: (codigo = crr.contareceber)
67. 5.222 5.222 ↑ 1.0 1 2,611

Index Scan using unidadeensino_pkey on unidadeensino (cost=0.15..0.17 rows=1 width=20) (actual time=0.001..0.002 rows=1 loops=2,611)

  • Index Cond: (codigo = contareceber.unidadeensinofinanceira)
68. 7.833 7.833 ↑ 1.0 1 2,611

Index Scan using formapagamentonegociacaorecebimento_pkey on formapagamentonegociacaorecebimento (cost=0.43..0.47 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=2,611)

  • Index Cond: (codigo = crr.formapagamentonegociacaorecebimento)
  • Filter: (crr.negociacaorecebimento = negociacaorecebimento)
69. 7.833 7.833 ↑ 1.0 1 2,611

Index Scan using negociacaorecebimento_pkey on negociacaorecebimento (cost=0.43..0.48 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=2,611)

  • Index Cond: (codigo = crr.negociacaorecebimento)
70. 2.611 2.611 ↑ 1.0 1 2,611

Index Scan using formapagamento_pkey on formapagamento (cost=0.14..0.16 rows=1 width=7) (actual time=0.001..0.001 rows=1 loops=2,611)

  • Index Cond: (codigo = formapagamentonegociacaorecebimento.formapagamento)
71. 5.222 5.222 ↑ 1.0 1 2,611

Index Scan using agencia_pkey on agencia (cost=0.28..0.30 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=2,611)

  • Index Cond: (contacorrente.agencia = codigo)
72. 5.222 5.222 ↑ 1.0 1 2,611

Index Scan using banco_pkey on banco (cost=0.14..0.17 rows=1 width=20) (actual time=0.001..0.002 rows=1 loops=2,611)

  • Index Cond: (agencia.banco = codigo)
73. 28.721 28.721 ↑ 1.0 1 2,611

Index Scan using matricula_pkey on matricula (cost=0.42..0.44 rows=1 width=22) (actual time=0.010..0.011 rows=1 loops=2,611)

  • Index Cond: ((contareceber.matriculaaluno)::text = (matricula)::text)
74. 15.666 15.666 ↑ 1.0 1 2,611

Index Scan using matriculaperiodo_pkey on matriculaperiodo (cost=0.42..0.44 rows=1 width=21) (actual time=0.005..0.006 rows=1 loops=2,611)

  • Index Cond: (codigo = contareceber.matriculaperiodo)
75. 5.222 18.277 ↑ 1.0 1 2,611

Bitmap Heap Scan on turma (cost=2.66..6.69 rows=1 width=27) (actual time=0.007..0.007 rows=1 loops=2,611)

  • Recheck Cond: ((matriculaperiodo.turma = codigo) OR (contareceber.turma = codigo))
  • Filter: (((contareceber.turma IS NULL) AND (matriculaperiodo.turma = codigo)) OR ((contareceber.turma IS NOT NULL) AND (contareceber.turma = codigo)))
  • Rows Removed by Filter: 0
  • Heap Blocks: exact=2613
76. 2.611 13.055 ↓ 0.0 0 2,611

BitmapOr (cost=2.66..2.66 rows=2 width=0) (actual time=0.005..0.005 rows=0 loops=2,611)

77. 5.222 5.222 ↑ 1.0 1 2,611

Bitmap Index Scan on turma_pkey (cost=0.00..0.29 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=2,611)

  • Index Cond: (matriculaperiodo.turma = codigo)
78. 5.222 5.222 ↑ 1.0 1 2,611

Bitmap Index Scan on turma_pkey (cost=0.00..0.29 rows=1 width=0) (actual time=0.002..0.002 rows=1 loops=2,611)

  • Index Cond: (contareceber.turma = codigo)
79. 7.833 7.833 ↑ 1.0 1 2,611

Index Scan using curso_pkey on curso (cost=0.27..0.29 rows=1 width=52) (actual time=0.002..0.003 rows=1 loops=2,611)

  • Index Cond: (matricula.curso = codigo)
80. 15.666 15.666 ↑ 1.0 1 2,611

Index Scan using pessoa_pkey on pessoa (cost=0.42..0.47 rows=1 width=29) (actual time=0.006..0.006 rows=1 loops=2,611)

  • Index Cond: (negociacaorecebimento.pessoa = codigo)
81. 0.000 0.000 ↓ 0.0 0 2,611

Index Scan using parceiro_pkey on parceiro (cost=0.28..0.30 rows=1 width=39) (actual time=0.000..0.000 rows=0 loops=2,611)

  • Index Cond: (negociacaorecebimento.parceiro = codigo)
82. 7.833 7.833 ↑ 1.0 1 2,611

Index Scan using pessoa_pkey on pessoa p2 (cost=0.42..0.85 rows=1 width=29) (actual time=0.002..0.003 rows=1 loops=2,611)

  • Index Cond: (codigo = matricula.aluno)
83. 2.611 2.611 ↓ 0.0 0 2,611

Index Scan using pk_chancela_codigo on chancela (cost=0.12..0.15 rows=1 width=9) (actual time=0.001..0.001 rows=0 loops=2,611)

  • Index Cond: (turma.chancela = codigo)