안녕하세요
아래 같은 방식의 테이블 동기화 확인 쿼리가 있습니다.
시간이 좀 오래 걸리는데 ..
조금 빨리 되게 하는 법 있을까요~?
감사합니다.
SELECT 'ERP_SEOUL' as GUBUN, 'AST.ADBDABSNALT' as TBL_NAME, COUNT(*), DECODE(COUNT(*), 0, NULL, 'ERROR!!!!') as ERROR FROM (SELECT * FROM AST.ADBDABSNALT MINUS SELECT * FROM AST.ADBDABSNALT@DL_HSSEMRDB) UNION ALL
SELECT 'ERP_SEOUL' as GUBUN, 'AST.ADBDCMCD' as TBL_NAME, COUNT(*), DECODE(COUNT(*), 0, NULL, 'ERROR!!!!') as ERROR FROM (SELECT * FROM AST.ADBDCMCD MINUS SELECT * FROM AST.ADBDCMCD@DL_HSSEMRDB) UNION ALL
SELECT 'ERP_SEOUL' as GUBUN, 'AST.ADBDINJ' as TBL_NAME, COUNT(*), DECODE(COUNT(*), 0, NULL, 'ERROR!!!!') as ERROR FROM (SELECT * FROM AST.ADBDINJ MINUS SELECT * FROM AST.ADBDINJ@DL_HSSEMRDB) UNION ALL
SELECT 'ERP_SEOUL' as GUBUN, 'AST.ADBDTBOO' as TBL_NAME, COUNT(*), DECODE(COUNT(*), 0, NULL, 'ERROR!!!!') as ERROR FROM (SELECT * FROM AST.ADBDTBOO MINUS SELECT * FROM AST.ADBDTBOO@DL_HSSEMRDB) UNION ALL
SELECT 'ERP_SEOUL' as GUBUN, 'AST.ADBMCMCD' as TBL_NAME, COUNT(*), DECODE(COUNT(*), 0, NULL, 'ERROR!!!!') as ERROR FROM (SELECT * FROM AST.ADBMCMCD MINUS SELECT * FROM AST.ADBMCMCD@DL_HSSEMRDB) UNION ALL
SELECT 'ERP_SEOUL' as GUBUN, 'AST.ADBMCOMCD' as TBL_NAME, COUNT(*), DECODE(COUNT(*), 0, NULL, 'ERROR!!!!') as ERROR FROM (SELECT * FROM AST.ADBMCOMCD MINUS SELECT * FROM AST.ADBMCOMCD@DL_HSSEMRDB) UNION ALL
SELECT 'ERP_SEOUL' as GUBUN, 'AST.ADBMCOMKIMS' as TBL_NAME, COUNT(*), DECODE(COUNT(*), 0, NULL, 'ERROR!!!!') as ERROR FROM (SELECT COMINFO FROM AST.ADBMCOMKIMS MINUS SELECT COMINFO FROM AST.ADBMCOMKIMS@DL_HSSEMRDB) UNION ALL
.
.
.
|