Long running Oracle SQL ..Implement stats in DataStage job
Posted: Wed Jul 20, 2016 10:19 am
Hi,
I have a production (multi instance) extract job which is running couple of hours daily for only one deployment data other deployments are running fine,While testing in QA for the root cause took only about 10-15 minutes when DBA collects stats before job execution.
SQL query is having multiple joins on tables , co-related sub -queries and also in and Not in statments in where clause
I am testing this following before sql statment in oracle connector stage
Director log :
I believe this is an access issue with application id for executing this stats but would like have input on the approach I am testing for Stats.
Thanks for the suggestions.
I have a production (multi instance) extract job which is running couple of hours daily for only one deployment data other deployments are running fine,While testing in QA for the root cause took only about 10-15 minutes when DBA collects stats before job execution.
Code: Select all
Oracle connector ---->extract.ds
I am testing this following before sql statment in oracle connector stage
Code: Select all
EXEC DBMS_STATS.GATHER_TABLE_STATS('sysadm','pch_hours');
Code: Select all
db_balance: The OCI function executeDirect returned status -1. Error code: 20,000, Error message: ORA-20000: Unable to analyze TABLE "SYSADM"."PCH_HOURS", insufficient privileges or does not exist
ORA-06512: at "SYS.DBMS_STATS", line 23818
ORA-06512: at "SYS.DBMS_STATS", line 23880
ORA-06512: at line 1. (CC_OraUtils::handleBeforeAfterSQL, file CC_OraUtils.cpp, line 5,098)
Thanks for the suggestions.