Query | Affected | Num. rows | Took (ms) | Actions |
---|
ALTER SESSION SET CURRENT_SCHEMA=crono | 0 | 0 | 0 | |
ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS' | 0 | 0 | 0 | |
ALTER SESSION SET NLS_NUMERIC_CHARACTERS='.,' | 0 | 0 | 0 | |
begin dbms_application_info.set_client_info('18.216.71.122'); end; | 1 | 1 | 3 | maybe slow |
begin dbms_application_info.set_module(module_name => 'desenv.cronotacografo.inmetro.rs.gov.br', action_name => '/relacao-de-postos/pr'); end; | 1 | 1 | 1 | |
SELECT view_name AS name FROM all_views UNION SELECT table_name AS name FROM all_tables | 9715 | 9715 | 195 | |
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = 'LOGS' | 10 | 10 | 2 | maybe slow |
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = 'USERS' | 39 | 39 | 5 | maybe slow |
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = 'CR_PERMISSOES' | 12 | 12 | 2 | maybe slow |
SELECT PEM.DS_MODULO
, PEA.DS_ACAO
, LISTAGG(NVL(PER.GRO_ID, '0'), ',') WITHIN GROUP (ORDER BY PEM.DS_MODULO ASC, PEA.DS_ACAO ASC) "GRO_ID"
FROM CRONO.CR_PERMISSOES PER
, CRONO.CR_PERMISSAO_MODULOS PEM
, CRONO.CR_PERMISSAO_ACOES PEA
WHERE PER.PEM_ID = PEM.PEM_ID
AND PER.PEA_ID = PEA.PEA_ID
AND PER.AO_STATUS = 1
AND PEM.AO_STATUS = 1
AND PEA.AO_STATUS = 1
GROUP BY PEM.DS_MODULO, PEA.DS_ACAO | 330 | 330 | 6 | |
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = 'CR_PARAMETROS' | 13 | 13 | 2 | maybe slow |
SELECT CrParametro.group_id, CrParametro.ds_observacao, CrParametro.par_id, CrParametro.no_parametro, CrParametro.vl_parametro, CrParametro.ds_descricao, CrParametro.created, CrParametro.created_by, CrParametro.created_ip, CrParametro.modified, CrParametro.modified_by, CrParametro.modified_ip, CrParametro.ao_status FROM cr_parametros CrParametro WHERE CrParametro.ao_status = 1 | 225 | 225 | 127 | maybe slow |
SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = 'ESTADOS' | 6 | 6 | 1 | maybe slow |
SELECT Estado.uf FROM estados Estado WHERE 1 = 1 ORDER BY Estado.uf ASC | 27 | 27 | 1 | |
select unf.sg_uf sg_uf
, unf.no_uf no_uf
, COUNT(*) quantidade
FROM HW_PROPRIETARIOS PRP,
HW_OFICINAS OFI,
HW_CEP_LOG_MUNS CLM,
HW_CEPS CEP,
HW_MUNICIPIOS MUN,
HW_UNIDADE_FEDERACOES UNF,
HW_LOGRADOUROS LOR,
HW_END_PRP_CRONOTACOGRAFOS EPC,
USERS USR,
CR_USER_AUTORIZACOES USA,
HW_UNIDADE_FEDERACOES unff
WHERE PRP.PRP_ID = OFI.PRP_ID
AND PRP.SRV_UNF_ID = OFI.SRV_UNF_ID
AND EPC.MLC_END_PRINC_ID = CLM.MLC_ID
AND EPC.SRV_UNF_ID = CLM.SRV_UNF_ID
AND CLM.CEP_ID = CEP.CEP_ID
AND CLM.SRV_UNF_ID = CEP.SRV_UNF_ID
AND CLM.MUN_ID = MUN.MUN_ID
AND CLM.SRV_UNF_ID = MUN.SRV_UNF_ID
AND MUN.UNF_ID = UNF.UNF_ID
AND CLM.LGR_ID = LOR.LGR_ID
AND CLM.SRV_UNF_ID = LOR.SRV_UNF_ID
AND PRP.PRP_ID = EPC.PRP_ID
AND PRP.SRV_UNF_ID = EPC.SRV_UNF_ID
AND USR.ID = USA.USR_ID
AND USA.PRP_ID = PRP.PRP_ID
AND USA.SRV_UNF_ID = PRP.SRV_UNF_ID
AND USA.OFI_ID = OFI.OFI_ID
AND USA.SRV_UNF_ID = OFI.SRV_UNF_ID
AND PRP.PRP_ID = OFI.PRP_ID
AND PRP.SRV_UNF_ID = OFI.SRV_UNF_ID
AND DECODE(USR.GROUP_ID, 3, 1, 4, 5, 24, 6) = OFI.TP_OFICINA
AND usr.uf = unf.sg_uf
and usr.group_id IN (3,4,24)
AND usr.uf = unff.sg_uf
AND OFI.AO_CRONOTACOGRAFO = 1
AND OFI.AO_CREDENCIADO = 1
AND PRP.AO_CRONOTACOGRAFO = 1
AND ((OFI.DT_DESCRED IS NULL) OR (OFI.DT_DESCRED > TRUNC(SYSDATE)))
AND ((OFI.TP_OFICINA != 5) OR
(OFI.TP_OFICINA = 5 AND OFI.SRV_UNF_ID = 2))
AND OFI.TP_OFICINA != 2
AND USR.ACESSO = 1
AND USR.STATUS = 1
AND ofi.ao_exibir_site_crono = 1
and ofi.tp_oficina = decode(usr.group_id, 3, 1, 10, 4, 4, 5, 24, 6)
and ((ofi.srv_unf_id = decode(ofi.user_unf_id, 13, 13, 30, 30, 16, 16, 35, 35, 2) and nvl(ofi.ao_migrar_uf_crono, 2) = 1 and ofi.user_unf_id IN (13, 35, 30, 16) and ofi.tp_oficina = 4)
OR (ofi.srv_unf_id = 2 and nvl(ofi.ao_migrar_uf_crono, 2) = 2 and ofi.tp_oficina = 4)
OR (ofi.srv_unf_id = 2 and ofi.tp_oficina IN (5, 6) )
OR (ofi.srv_unf_id = decode(ofi.user_unf_id, 13, 13, 30, 30, 16, 16, 35, 35, 2) and ofi.tp_oficina NOT IN (4, 5, 6) )
)
group by unf.sg_uf, unf.no_uf
order by unf.no_uf asc | 27 | 27 | 252 | maybe slow |
select ofi.ofi_id,
usr.id,
CONVERT(UPPER(prp.no_proprietario),'UTF8','WE8ISO8859P1') no_proprietario,
CONVERT(UPPER(prp.ds_fantasia),'UTF8','WE8ISO8859P1') ds_fantasia,
DECODE(ofi.tp_oficina, 1,3,5,4,6,24) group_id,
CONVERT(epc.nr_endereco,'UTF8','WE8ISO8859P1') nr_endere_o,
CONVERT(UPPER(epc.ds_complemento),'UTF8','WE8ISO8859P1') ds_complemento,
CONVERT(UPPER(epc.no_bairro),'UTF8','WE8ISO8859P1') no_bairro,
epc.nr_email,
cep.cd_cep,
UPPER(mun.no_municipio) no_municipio,
unf.sg_uf,
CONVERT(UPPER(hw_fnc_retorna_valor_dominio(clm.tp_logradouro,'TP_LOGRADOURO', 1))||' '||lor.no_logradouro,'UTF8','WE8ISO8859P1') endereco,
epc.nr_ddd_telefone,
epc.nr_telefone
from hw_proprietarios prp,
hw_oficinas ofi,
hw_cep_log_muns clm,
hw_ceps cep,
hw_municipios mun,
hw_unidade_federacoes unf,
hw_logradouros lor,
hw_end_prp_cronotacografos epc,
users usr,
cr_user_autorizacoes usa
where prp.prp_id = ofi.prp_id and prp.srv_unf_id = ofi.srv_unf_id
and epc.mlc_end_princ_id = clm.mlc_id and epc.srv_unf_id = clm.srv_unf_id
and clm.cep_id = cep.cep_id and clm.srv_unf_id = cep.srv_unf_id
and clm.mun_id = mun.mun_id and clm.srv_unf_id = mun.srv_unf_id
and mun.unf_id = unf.unf_id
and clm.lgr_id = lor.lgr_id and clm.srv_unf_id = lor.srv_unf_id
and prp.prp_id = epc.prp_id and prp.srv_unf_id = epc.srv_unf_id
and usr.id = usa.usr_id
and usa.prp_id = prp.prp_id and usa.srv_unf_id = prp.srv_unf_id
and usa.ofi_id = ofi.ofi_id and usa.srv_unf_id = ofi.srv_unf_id
and prp.prp_id = ofi.prp_id and prp.srv_unf_id = ofi.srv_unf_id
and DECODE(usr.group_id, 3,1,4,5,24,6) = ofi.tp_oficina
and usr.group_id IN (3,4,24) and unf.sg_uf = 'PR'
and ofi.ao_cronotacografo = 1
and ofi.ao_credenciado = 1
and prp.ao_cronotacografo = 1
and ((ofi.DT_DESCRED is Null) or (ofi.DT_DESCRED > trunc(sysdate)))
and ((ofi.tp_oficina != 5 ) or (ofi.tp_oficina = 5 and ofi.srv_unf_id = 2))
and ofi.tp_oficina != 2
and usr.acesso = 1
and usr.status = 1
and ofi.ao_exibir_site_crono = 1
and ofi.tp_oficina = decode(usr.group_id, 3, 1, 10, 4, 4, 5, 24, 6)
and ((ofi.srv_unf_id = decode(ofi.user_unf_id, 13, 13, 30, 30, 16, 16, 35, 35, 2) and nvl(ofi.ao_migrar_uf_crono, 2) = 1 and ofi.user_unf_id IN (13, 35, 30, 16) and ofi.tp_oficina = 4)
OR (ofi.srv_unf_id = 2 and nvl(ofi.ao_migrar_uf_crono, 2) = 2 and ofi.tp_oficina = 4)
OR (ofi.srv_unf_id = 2 and ofi.tp_oficina IN (5, 6) )
OR (ofi.srv_unf_id = decode(ofi.user_unf_id, 13, 13, 30, 30, 16, 16, 35, 35, 2) and ofi.tp_oficina NOT IN (4, 5, 6) )
)
order by usr.razaosocial | 81 | 81 | 5609 | maybe slow |