All Forums Database
tclear 12 posts Joined 06/12
12 Aug 2013
Collect Statistics

Database Version: Teradata 13.10.0609  13.10.06.09A
Provider Version: ODBC 14.00.00.04
 
CREATE TABLE MY_TABLE AS (
SELECT COL1
 , COL2
 , COL3
FROM DB_TABLE
)WITH DATA
PRIMARY INDEX (COL1);
COLLECT STATISTICS MY_TABLE INDEX(COL1);
 
The table gets created, but collect statistics fails.
I have run the same process for months, but now I cannot collect statistics

dnoeth 4628 posts Joined 11/04
13 Aug 2013

Could you show the output (preferably BTEQ) including the actual error message?
This should run.
Dieter

Dieter

tclear 12 posts Joined 06/12
14 Aug 2013

No error message is generated.
After lots of trial and error, the solution was to uninstall and reinstall
Teradata SQL assistant. Do not know what went wrong, but everything
is back to normal, for now.
 
Thanks

VBurmist 96 posts Joined 12/09
14 Aug 2013

You can use DBQL to locate the error code and message (if the client was able to submit the SQL statement to the Teradata, which is hopefully true). 
 

Divine786 10 posts Joined 08/13
21 Aug 2013

I am taking a join on a index column & its taking time to execute the following query 

SELECT

A.ACCOUNT_NUM AS ACCOUNT_ID,

A.Limit_Type_Cd,

A.Acct_Limit_Amt,

A.Acct_Limit_Expiry_Dt,

A.Acct_Limit_Ref_Id,

B.Limit_Ref_ID,

C.Collateral_Item_Id,

C.Collateral_Item_Type_Cd,

C.Collateral_Item_Status_Cd,

C.Collateral_Value_Amt,

C.Collateral_Nominal_Value_Amt,

C.Collateral_Max_Value_Amt,

C.Collateral_Item_Expiry_Dt

FROM UT_TAB.ACCOUNT_CREDIT_LIMIT AS A

 

INNER JOIN UT_TAB.LIMIT_DETAILS AS B

ON

A.ACCT_LIMIT_REF_ID = B.LIMIT_REF_ID

 

INNER JOIN UT_TAB.COLLATERAL_ITEM AS C

ON

B.Limit_Linked_CollateraL = C.Collateral_Item_Categ_Cd

 

 

C.Collateral_Item_Categ_Cd is the Secondary index column is there any solution to get the result faster

Shelley 28 posts Joined 09/10
21 Aug 2013

You need to show the ddl of the tables, the stats that are collected and the explain from the query to help determine why it is performing slowly.
--Shelley--

You must sign in to leave a comment.