Teradata PX

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Teradata PX

Post by kumar66 »

Hi All,

I am loading data to Teradata from a dataset. My source has around 6 million rows and I have 6 fields.

The jobs takes around 5 hours to complete. Is there any way to make it faster. And my table is a full refresh.

Please Advice.

Thanks & Regards,
Kumar66
toshea
Participant
Posts: 79
Joined: Thu Aug 14, 2008 6:46 pm

Post by toshea »

You should be using the Teradata Enterprise stage.
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Post by kumar66 »

Yes, I am using Teradata Enterprise Stage. And even I tried with Multiload stage.

The job runs for 5- 6 hours.

Please Advise.

Thanks & Regards,
Kumar66
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

how any sessions are used?
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Post by kumar66 »

Hi keshav,


8 Sessions are connected.


Thanks & Regards,
Kumar66
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

are you doing anything else in your job, then just reading the dataset and load using teradata Enterprise stage?
it should not take more then 10 min to load this volume.
the atrget is set table or multiset? have you choosen correct key and Primary Index.
for lnsert Teradata Enterprise stage is fastest.
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Post by kumar66 »

Hi Keshav,

It is a multiset table. I have pasted my DDL below:

CREATE MULTISET TABLE FFRED.STG_PMOTN,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
FREESPACE = 0 PERCENT,
CHECKSUM = DEFAULT
(
PMOTN_CD VARCHAR(20) CHARACTER SET LATIN CASESPECIFIC NOT NULL,
PMOTN_ID INTEGER NOT NULL,
BI_INTF_PROC_NM CHAR(30) CHARACTER SET LATIN CASESPECIFIC NOT NULL,
BI_INTF_CRT_DTTM TIMESTAMP(0) NOT NULL,
BI_ETL_BTCH_ID INTEGER NOT NULL,
BI_ETL_PROC_DTTM TIMESTAMP(0) NOT NULL)
UNIQUE PRIMARY INDEX ( PMOTN_CD ,PMOTN_ID );



Is there anything to add to the DDL?

Please Advise.

Thank & Regards,
Kumar66
nishadkapadia
Charter Member
Charter Member
Posts: 47
Joined: Fri Mar 18, 2005 5:59 am

Post by nishadkapadia »

following could be some pointers related :
check pls on the index and it's skewness whilst loading into table.[ can get in touch with DBA if required ]
any full row duplicate records exist
any index related duplicate records exist
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Post by kumar66 »

Hi All,

I checked the log file and it gives me teradata error code 6750- Invalid Timestamp.

Then I changed TIMESTAMP(0) NOT NULL to CHAR(19) NOT NULL in my DDL.

The job takes 5 mins to complete the 6 million rows. Is it right to chnage the timestamo datatype to char? And

How to define the TIMESTAMP datatype in Teradata?


Please Advise.

Thanks & Regards,
Kumar66
toshea
Participant
Posts: 79
Joined: Thu Aug 14, 2008 6:46 pm

Post by toshea »

Rather than changing the DDL of your target table column to CHAR(19), you should change the data type of your input link column to Timestamp.
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Post by kumar66 »

Yes my input column type is Timestamp. But if dont chnage my DDL to Char , I am getting this error.
toshea
Participant
Posts: 79
Joined: Thu Aug 14, 2008 6:46 pm

Post by toshea »

Is it possible that you are setting the Extended attribute on the Timestamp column to Microseconds? You should not set that attribute. Intead you should leave it blank. Since your target table's column is defined as TIMESTAMP(0), you don't want the Microseconds extended attribute.
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Post by kumar66 »

No I am not. I have give datatype as timeatamp and size as 23 .


Thanks & Regards,
Kumar66
toshea
Participant
Posts: 79
Joined: Thu Aug 14, 2008 6:46 pm

Post by toshea »

I would expect the length of a TIMESTAMP(0) to be 19 (YYYY-MM-DD HH:MM:SS).
kumar66
Participant
Posts: 265
Joined: Thu Jul 26, 2007 12:14 am

Post by kumar66 »

I tried with Timestamp 19 in the input link, but the job gets aborted. So I changed the DDL to char(19) , it works fine.
Post Reply