explain.depesz.com

PostgreSQL's explain analyze made readable

Result: shFx

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

Hash Join (cost=70,025.07..80,558.82 rows=12,500 width=4,335) (actual rows= loops=)

  • Hash Cond: (t.tp_doc_id = doc.id)
2. 0.000 0.000 ↓ 0.0

Hash Join (cost=50,012.57..60,102.57 rows=2,500 width=3,811) (actual rows= loops=)

  • Hash Cond: (t.cli_id = c.id)
3. 0.000 0.000 ↓ 0.0

Foreign Scan (cost=10,000.00..20,000.00 rows=1,000 width=3,728) (actual rows= loops=)

  • Oracle query: SELECT /*6114bc29a78a0df78b54e8df3ad7c819*/ r1.""DT_EMIS"", r1.""DT_ULT_MOV"", r1.""DT_VCTO"", r1.""EST_ID"", r1.""EST_ID_FAT"", r1.""POR_ID"", r1.""TP_DOC_ID"", r1.""ID"", r1.""NFS_ID"", r1.""NSU"", r1.""NUM_TIT"", r1.""PARC"", r1.""VLR_AB"", r1.""VLR_TIT"", r1.""VLR_DESC"", r1.""VLR_JUROS"", r1.""VLR_MULTA"", r1.""VLR_PGTO"", r1.""NUM_BCO"", r1.""DESC_ESP"", r1.""DESP_CARTORIO"", r1.""PERC_COMIS"", r1.""BASE_COMIS"", r1.""OBS"", r1.""AB"", r1.""EMPR_ID"", r1.""MOE_ID"", r1.""TTP_CR_ID"", r1.""CLI_ID"", r1.""DT_BCO"", r1.""REP_ID"", r1.""TPCOBR_ID"", r1.""DIAS_PROT"", r1.""TCOM_REM_ID"", r1.""TINST_COBR_ID_1"", r1.""TINST_COBR_ID_2"", r1.""ULT_NRO_GER"", r1.""DESC_DUPL"", r1.""IMPRESSO"", r1.""VLR_OUT_DESP"", r1.""PERC_COMIS_FAT"", r1.""PERC_COMIS_PGTO"", r1.""NFE_ID"", r1.""IOC"", r1.""COEFICIENTE"", r1.""DT_NEGOCIACAO"", r1.""TXB_CDCI_ID"", r1.""DESCR_COM_REM"", r1.""NFS_ID_TCR_ROYFP"", r1.""BAIRRO"", r1.""BCO_ID"", r1.""BORDERO_CHQ"", r1.""CEP"", r1.""CID_ID"", r1.""CLI_V_CLI_ID"", r1.""CNPJ_CPF"", r1.""CNPJ_CPF_EMI"", r1.""COD_BARRAS_CHQ"", r1.""DT_CRED_CHQ"", r1.""DT_DESC_PON"", r1.""DT_DEV_CHQ"", r1.""DT_TRANSMISSAO"", r1.""DT_VENDOR"", r1.""ENDERECO"", r1.""FUNC_ID"", r1.""INDICE_RESC"", r1.""INSC_EST"", r1.""MOT_CAN_ID"", r1.""NOME"", r1.""NUM_CHQ"", r1.""REP_PREP_ID"", r1.""SIT_CHQ"", r1.""TAXA_VENDOR"", r1.""TELEFONE"", r1.""VLR_DESC_PON"", r1.""CONS_ID"", r1.""VLR_COFINS"", r1.""VLR_CSLL"", r1.""VLR_IRPJ"", r1.""VLR_ISSQN"", r1.""VLR_PIS"", r1.""PERC_IND_FAT"", r1.""PERC_IND_PGTO"", r1.""SRNF_ID"", r1.""LETRA_SERASA"", r1.""VLR_TIT_MOE_ORIG"", r1.""MOE_ID_ORIG"", r1.""PDV_ID"", r1.""ALIQ_PIS"", r1.""BASE_CALC_PIS"", r1.""ALIQ_COFINS"", r1.""BASE_CALC_COFINS"", r1.""VLR_AB_PIS"", r1.""VLR_AB_COFINS"", r1.""VLR_AB_MOE_EXT"", r1.""BASE_COMIS_MOE_EXT"", r1.""VAR_CAMBIAL_ATIVA"", r1.""VAR_CAMBIAL_PASSIVA"", r1.""TAXA_VENDOR_COMPRADOR"", r1.""COD_IND_RETENCAO"", r1.""IND_RET_ORGAO_PUBLICO"", r1.""ORC_ID"", r1.""VLR_DISP_NEG"", r1.""DT_BORDERO"", r1.""EMPR_ID_BORDERO"", r1.""BASE_CALC_PIS_FAT"", r1.""ALIQ_PIS_FAT"", r1.""VLR_PIS_FAT"", r1.""VLR_AB_PIS_FAT"", r1.""BASE_CALC_COFINS_FAT"", r1.""ALIQ_COFINS_FAT"", r1.""VLR_COFINS_FAT"", r1.""VLR_AB_COFINS_FAT"", r1.""BASE_CALC_PIS_ST"", r1.""ALIQ_PIS_ST"", r1.""VLR_PIS_ST"", r1.""VLR_AB_PIS_ST"", r1.""BASE_CALC_COFINS_ST"", r1.""ALIQ_COFINS_ST"", r1.""VLR_COFINS_ST"", r1.""VLR_AB_COFINS_ST"", r1.""VLR_NEG"", r1.""COD_AUTORIZACAO"", r1.""NUM_NFSE"", r1.""IMP_INTEGRADOR"", r1.""INTEGRACAO_ID"", r1.""CARTAO"" FROM (""FOCCO3I"".""TTIT_CR"" r1 INNER JOIN ""FOCCO3I"".""TEMPRESAS"" r4 ON (r1.""EMPR_ID"" = r4.""ID""))
4. 0.000 0.000 ↓ 0.0

Hash (cost=40,006.32..40,006.32 rows=500 width=115) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Hash Join (cost=30,002.52..40,006.32 rows=500 width=115) (actual rows= loops=)

  • Hash Cond: (c.id = estabelecimentos.cli_id)
6. 0.000 0.000 ↓ 0.0

Foreign Scan on clientes c (cost=10,000.00..20,000.00 rows=1,000 width=83) (actual rows= loops=)

  • Oracle query: SELECT /*c56a88e71894c71d082794d07a685dcf*/ r2.""ID"", r2.""COD_CLI"", r2.""DESCRICAO"" FROM ""FOCCO3I"".""TCLIENTES"" r2
7. 0.000 0.000 ↓ 0.0

Hash (cost=20,002.51..20,002.51 rows=1 width=32) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

HashAggregate (cost=20,002.50..20,002.51 rows=1 width=32) (actual rows= loops=)

  • Group Key: estabelecimentos.cli_id
9. 0.000 0.000 ↓ 0.0

Foreign Scan on estabelecimentos (cost=10,000.00..20,000.00 rows=1,000 width=32) (actual rows= loops=)

  • Oracle query: SELECT /*c6d9585f158dad1c2ab6911aef7c845a*/ r9.""CLI_ID"", r9.""CNPJ"", r9.""CPF"" FROM ""FOCCO3I"".""TESTABELECIMENTOS"" r9 WHERE ((r9.""CPF"" = 8409017989) OR (r9.""CNPJ"" = 8409017989))
10. 0.000 0.000 ↓ 0.0

Hash (cost=20,000.00..20,000.00 rows=1,000 width=76) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Foreign Scan on tipo_documento doc (cost=10,000.00..20,000.00 rows=1,000 width=76) (actual rows= loops=)