我有一个需要调整的大查询。我看不到任何可以优化的地方。全部收集推荐和必需的统计数据。你能看看并建议吗?它通过informatica.Below提交查询时执行快照转储是我们得到的错误: 3610内部错误:请不要重新提交上一个请求。 SubCode,CrashCode:0,3651
SELECT
TD.INFORMATION_DATE AS INFORMATION_DATE ,
TD.PROCESSING_DATE AS PROCESS_DATE ,
NULL AS EXCEPTION_REASON_POA ,
NULL AS EXCEPTION_REASON_CUST ,
NULL AS EXCEPTION_REASON_SITE ,
NULL AS EXCEPTION_REASON_SIC ,
FRET.FIC_REPORTING_ENTITY_ID AS REPORTING_ENTITY_ID ,
NULL AS REPORTERS_REFERENCE_NO ,
'CTR' AS REPORT_CODE ,
NULL AS REPORT_SUBMISSION_DATE ,
TD.TRANSACTION_EFFECTIVE_DATE AS TRANSACTION_DATE ,
TD.TRANSACTION_AMT AS TRANSACTION_AMOUNT ,
TD.TRANSACTION_CURRENCY_CODE AS TXN_CURRENCY_CODE ,
CASE
WHEN CFT.FUNCTION_TYPE_CODE IN ( 'CDK' , 'MDK' , 'CW' , 'CWA' ,
'CDMK' , 'CWC' , 'CWR' , 'CWS' , 'QDAK' , 'QE' , 'TCS' , 'CDF' ,
'BNRP' , 'NRW' , 'FBS' , 'BNTF' , 'BNSP' , 'TOTP' , 'TOTB' ,
'BNSL' , 'CDCK' ) THEN 'CASH OUT'
ELSE 'CASH IN'
END AS TRANSACTION_DIRECTION ,
TD.TRANSACTION_SOURCE_TYPE_DESC AS TXN_TYPE ,
TD.FUNCTION_TYPE_DESC AS FUNCTION_CODE ,
TD.TRANSACTION_BRANCH AS TXN_BRANCH ,
TD.ACCOUNT_BRANCH AS ACCOUNT_BRANCH ,
TD.ACCOUNT_NUMBER AS ACCOUNT_NUMBER ,
TD.BRAND_TYPE_DESC AS ACCOUNT_TYPE ,
TD.TRANSACTION_ADDRESS AS TXN_ADDRESS ,
TD.TRANSACTION_CITY_NAME AS TXN_CITY ,
TD.TRANSACTION_POSTAL_CODE AS TXN_POSTAL_CODE ,
TD.TRANSACTION_COUNTRY_CODE AS TXN_COUNTRY_CODE ,
NULL AS TXN_PROVINCE ,
NULL AS CUSTOMER_TYPE_GROUP_CODE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.NAME_INITIALS
ELSE NULL
END AS CUSTOMER_TITLE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.GIVEN_NAME
ELSE NULL
END AS FIRST_NAME ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.SURNAME
ELSE NULL
END AS LAST_NAME ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.BIRTH_DATE
ELSE NULL
END AS BIRTHDATE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.COUNTRY_OF_NATIONALITY_CODE
ELSE NULL
END AS NATIONALITY ,
CEC.E_MAIL_USER_ID AS EMAIL_ADDRESS ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.INDV_OCCUPATION_TYPE_DESC
ELSE NULL
END AS OCCUPATION ,
CPC_BP.TELEPHONE_DIAL_CODE AS BUSINESS_DIAL_CODE ,
CPC_BP.TELEPHONE_NUM AS BUSINESS_PHONE_NUMBER ,
CPC_HP.TELEPHONE_DIAL_CODE AS RESIDENTIAL_DIAL_CODE ,
CPC_HP.TELEPHONE_NUM AS RESIDENTIAL_PHONE_NUMBER ,
OC.PRACTICE_NUMBER AS PRACTISE_NUMBER ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.FIC_IDENTIFICATION_TYPE_CODE
ELSE NULL
END AS ID_TYPE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.IDENTIFICATION_NUM
ELSE NULL
END AS ID_NUMBER ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.COUNTRY_PASSPORT_ISSUED_NAME
ELSE NULL
END AS PASSP_ISD_COUNTRY_CODE ,
CAC_RA.ADDRESS_NAME_1 AS PHYSICAL_ADDR_LINE ,
CAC_RA.CITY_NAME AS PHYSICAL_CITY ,
CAC_RA.POSTCODE_AREA AS PHYSICAL_POST_CODE ,
NULL AS BRAND_SHORT_NAME_ACCOUNT ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.UNIQUE_ID_IN_SOURCE_SYSTEM
ELSE NULL
END AS CUSTOMER_KEY ,
TD.ACCOUNTABLE_INSTITUTION_CODE AS ACCOUNTABLE_INSTIT_CODE ,
TD.SOURCE_SYSTEM_DESC AS SOURCE_SYSTEM ,
TD.TRANSACTION_QTY AS TXN_COUNT_TOT ,
OC.SIC_TYPE_DESC AS TYPE_OF_BUSINESS ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.UNIQUE_ID_IN_SOURCE_SYSTEM
ELSE NULL
END AS SIG_CUSTOMER_KEY ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.CUSTOMER_TYPE_CODE
ELSE NULL
END AS SIG_CUSTOMER_TYPE_CODE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.NAME_INITIALS
ELSE NULL
END AS SIG_TITLE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.GIVEN_NAME
ELSE NULL
END AS SIG_FIRST_NAME ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.SURNAME
ELSE NULL
END AS SIG_LAST_NAME ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.BIRTH_DATE
ELSE NULL
END AS SIG_BIRTHDATE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.COUNTRY_OF_NATIONALITY_CODE
ELSE NULL
END AS SIG_NATIONALITY , CEC.E_MAIL_USER_ID AS SIG_EMAIL_ADDRESS ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.INDV_OCCUPATION_TYPE_DESC
ELSE NULL
END AS SIG_OCCUPATION ,
CPC_BP.TELEPHONE_DIAL_CODE AS SIG_BUSINESS_DIAL_CODE ,
CPC_BP.TELEPHONE_NUM AS SIG_BUSINESS_PHONE_NUMBER ,
CPC_HP.TELEPHONE_DIAL_CODE AS SIG_RESIDENTIAL_DIAL ,
CPC_HP.TELEPHONE_NUM AS SIG_RESIDENTIAL_PHONE_NUM ,
OC.PRACTICE_NUMBER AS SIG_PRACTISE_NUMBER ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.FIC_IDENTIFICATION_TYPE_CODE
ELSE NULL
END AS SIG_ID_TYPE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.IDENTIFICATION_NUM
ELSE NULL
END AS SIG_ID_NUMBER ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.COUNTRY_PASSPORT_ISSUED_NAME
ELSE NULL
END AS SIG_PASSP_ISD_CNTRY_CODE ,
CAC_RA.ADDRESS_NAME_1 AS SIG_PHYSICAL_ADDR_LINE ,
CAC_RA.CITY_NAME AS SIG_PHYSICAL_CITY ,
CAC_RA.POSTCODE_AREA AS SIG_PHYSICAL_POST_CODE ,
NULL AS ERROR_STATUS ,
NULL AS BATCH_ID ,
NULL AS FORMAT_TYPE ,
NULL AS BATCH_SORT ,
TD.TRANSACTION_BRANCH AS ACCT_TXN_SITE_ZERO ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.CUSTOMER_TYPE_CODE
ELSE NULL
END AS CUSTOMER_TYPE_CODE ,
NULL AS RESUBMISION_STATUS ,
NULL AS BATCH_ERROR_STATUS ,
NULL AS FIC_RESUBMIT ,
TD.TRANSACTION_COUNTRY_CODE AS COUNTRY_CODE_FROM_CTR ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.COUNTRY_OF_RESIDENCE_CODE
ELSE NULL
END AS SIG_COUNTRY_CODE ,
TD.TRANSACTION_CUSTOMER_KEY AS TXN_CUSTOMER_KEY ,
TD.PARTY_DETAILS AS REPORT_PARTIES ,
NULL AS STATUS_COMMENT ,
NULL AS PROPERTY_SIZE ,
TD.SIZE_UNIT_OF_MEASUREMENT AS SIZE_UNIT_OF_MEASUREMENT ,
NULL AS REGISTRATION_DATE ,
OC.ORG_REGISTRATION_NUM AS REGISTRATION_NUMBER ,
NULL AS ITEM_ID_NUMBER ,
NULL AS ADDITIONAL_COMMENTS ,
TD.ITEM_TYPE_CODE AS ITEM_DESCRIPTION ,
NULL AS PREVIOUS_REGISTERED_TO ,
NULL AS CURRENT_REGISTERED_TO ,
TD.ESTIMATED_VAL_AMT AS ESTIMATED_VALUE ,
NULL AS DISPOSED_VALUE ,
NULL AS REPORTING_PERSON ,
TD.TRANSACTION_COUNTRY_CODE AS BANK_COUNTRY ,
TD.ITEM_TYPE_CODE AS ITEM_TYPE ,
NULL AS ITEM_MAKE ,
NULL AS ITEM_REGISTRATION_NUMBER ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.SURNAME
ELSE NULL
END AS MOTHERS_NAME ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.SOCIAL_SECURITY_NUMBER
ELSE NULL
END AS SOCIAL_SECURITY_NUMBER ,
CAC_EA.ADDRESS_NAME_1 AS EMPLOYER_ADDRESS_ID ,
CPC_BP.TELEPHONE_NUM AS EMPLOYER_PHONE_ID ,
NULL AS SWIFT_CODE ,
NULL AS NON_BANKING_INSTIT_FLAG ,
NULL AS SIG_ROLE ,
TD.POST_TRANS_ACC_BAL_AMT AS BALANCE ,
TD.ACCOUNT_NAME AS ACCOUNT_NAME ,
NULL AS INT_BANK_ACCOUNT_NUMBER ,
NULL AS PRIMARY_CUSTOMER_FLAG ,
TD.TRANS_STATUS_TYPE_CODE AS STATUS_CODE ,
OC.FIC_ENTITY_LEGAL_FORM AS INCORPORATION_LEGAL_FORM ,
CWAC_BW.UNIVERSAL_RESOURCE_LOCATOR AS INTERNET_WEB_SITE ,
OC.INVOLVED_PARTY_NAME AS TRADING_NAME ,
NULL AS DATE_OF_INCORPORATION ,
NULL AS DATE_BUSINESS_CLOSED ,
NULL AS BUSINESS_CLOSED_FLAG ,
CAC_PA.ADDRESS_NAME_1 AS POSTAL_ADDRESS_LINE_2 ,
CAC_PA.CITY_NAME AS POSTAL_ADDRESS_LINE_3 ,
NULL AS TYPE_OF_FUNDS ,
NULL AS TXN_CONDUCTOR ,
NULL AS TYPE_OF_FUNDS_DESC ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.DECEASED_FLAG
ELSE NULL
END AS DECEASED_FLAG ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.IDENTIFICATION_ISSUE_DATE
ELSE NULL
END AS ID_ISSUE_DATE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.INDV_TEMP_RESIDENCE_EXP_DATE
ELSE NULL
END AS ID_EXPIRY_DATE , NULL AS ISSUING_AUTHORITY_NAME ,
CASE
WHEN IC_N.SOURCE_FILE_NAME = 'SIG' THEN IC_N.DEATH_NOTIFICATION_DATE
ELSE NULL
END AS DATE_OF_DEATH ,
OC.VALUE_ADDED_TAX_NUM AS VAT_REGISTRATION_NUMBER ,
NULL AS SOURCE_OF_WEALTH ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.GIVEN_NAME
ELSE NULL
END AS MIDDLE_NAME , TD.ACCOUNT_BRANCH AS DOMICILE_SITE_CODE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.COUNTRY_PASSPORT_ISSUED_CODE
ELSE NULL
END AS COUNTRY_PASSPORT_ISSUED ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.COUNTRY_OF_RESIDENCE_CODE
ELSE NULL
END AS COUNTRY_OF_RESIDENCE ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.NAME_INITIALS
ELSE NULL
END AS INITIALS ,
CPC_BP.TELEPHONE_NUM (NAMED ASPHONE_EXTENSION_NUMBER ) ,
NULL AS STR_CLASIFICATION_IND ,
NULL AS TRANSACTION_DESCRIPTION ,
NULL AS TXN_AUTHORISOR ,
TD.TRANSACTION_EFFECTIVE_DATE AS VALUE_DATE ,
NULL AS TRANSACTION_MODE_COMMENT ,
TD.PARTY_DETAILS AS PARTY_DETAILS ,
NULL AS GOODS_SERVICES_LINKED ,
NULL AS TELLER_NUMBER ,
TD.AR_OPEN_DATE AS DATE_ACCOUNT_OPENED ,
OC.ORG_TAX_IDENTIFIED_NUM AS TAX_NUMBER ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.GENDER_DESC
ELSE NULL
END AS GENDER ,
CASE
WHEN IC_N.SOURCE_FILE_NAME <> 'SIG' THEN IC_N.COUNTRY_OF_BIRTH_NAME
ELSE NULL
END AS COUNTRY_OF_BIRTH ,
TD.TRANSACTION_CURRENCY_CODE AS CURRENCY_CODE ,
TD.SOURCE_SYSTEM_CODE AS SOURCE_SYSTEM_CODE ,
CURRENT_TIMESTAMP( 6 ) AS DW_LOAD_TIMESTAMP ,
NULL AS DW_INVALIDATED_TIMESTAMP
FROM X_TRANS.TRANSACTION_DAILY TD
LEFT OUTER JOIN X_REF.COMBD_FUNCTION_TYPE CFT
ON CFT.FUNCTION_TYPE_DESC = TD.FUNCTION_TYPE_DESC
AND CFT.EFFECTIVE_END_DATE = '3499-12-31'
LEFT OUTER JOIN X_REF.FIC_REPORTING_ENTITY_TYPE FRET
ON TD.ACCOUNTABLE_INSTITUTION_CODE = FRET.FIC_REPORTING_ENTITY_ID
AND FRET.EFFECTIVE_END_DATE = '3499-12-31'
LEFT OUTER JOIN X_TRANS.INDIVIDUAL_CURRENT IC_N
ON TD.INVOLVED_PARTY_ID = IC_N.INVOLVED_PARTY_ID
LEFT OUTER JOIN X_TRANS.CUSTOMER_EMAIL_CURRENT CEC
ON TD.INVOLVED_PARTY_ID = CEC.INVOLVED_PARTY_ID
LEFT OUTER JOIN X_TRANS.CUSTOMER_PHONE_CURRENT CPC_BP
ON TD.INVOLVED_PARTY_ID = CPC_BP.INVOLVED_PARTY_ID
AND CPC_BP.IP_TEL_ADDRESS_RLN_TYPE_CODE = 'BPNR'
LEFT OUTER JOIN X_TRANS.CUSTOMER_PHONE_CURRENT CPC_HP
ON TD.INVOLVED_PARTY_ID = CPC_HP.INVOLVED_PARTY_ID
AND CPC_HP.IP_TEL_ADDRESS_RLN_TYPE_CODE = 'HPNR'
LEFT OUTER JOIN X_TRANS.ORGANIZATION_CURRENT OC
ON TD.INVOLVED_PARTY_ID = OC.INVOLVED_PARTY_ID
LEFT OUTER JOIN X_TRANS.CUSTOMER_ADDRESS_CURRENT CAC_RA
ON TD.INVOLVED_PARTY_ID = CAC_RA.INVOLVED_PARTY_ID
AND CAC_RA.IP_ADDRESS_RLTNP_TYPE_CODE = '10'
LEFT OUTER JOIN X_TRANS.CUSTOMER_WEB_ADDRESS_CURRENT CWAC_BW
ON TD.INVOLVED_PARTY_ID = CWAC_BW.INVOLVED_PARTY_ID
AND CWAC_BW.IP_WEB_ADDRESS_RLN_CODE = 'BW'
LEFT OUTER JOIN X_TRANS.CUSTOMER_ADDRESS_CURRENT CAC_PA
ON TD.INVOLVED_PARTY_ID = CAC_PA.INVOLVED_PARTY_ID
AND CAC_PA.IP_ADDRESS_RLTNP_TYPE_CODE = '1'
LEFT OUTER JOIN X_TRANS.CUSTOMER_ADDRESS_CURRENT CAC_EA
ON TD.INVOLVED_PARTY_ID = CAC_EA.INVOLVED_PARTY_ID
AND CAC_EA.IP_ADDRESS_RLTNP_TYPE_CODE = '70'
WHERE TD.INFORMATION_DATE = CURRENT_TIMESTAMP;
感谢您耐心等待代码。
此致 阿米特
答案 0 :(得分:1)
没有办法调整&#34;此查询,请求您的DBA使用Teradata支持打开事件。您发现了一个错误,请勿尝试自行修复。
请遵循建议,不要再次提交(日志中记录了3610,包括导致它的用户)。有一些增强请求(由DBA提供),例如&#34;将错误消息更改为嘿愚蠢,我刚刚告诉您不要再次提交,当它第二次提交并阻止用户时第三次&#34;