|
|
Archives of the TeradataForum
Message Posted: Tue, 17 Jan 2012 @ 09:13:28 GMT
Subj: | | Re: Solutions to Data Skewing |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Monday, January 16, 2012 19:15 -->
| What is the table structure like (DDL)? | |
Create Multiset table Mysandbox.Consolidated_orders,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(SALES_ASSOCIATE_NBR Integer NOT nUll ,
-- Some more columns
ORDERS_MEAS_KY INTEGER NOT NULL,
ORDERS_PROC_DT DATE FORMAT 'YYYY-MM-DD' NOT NULL, ORDER_TRANS_CD CHAR(7) CHARACTER SET
LATIN NOT CASESPECIFIC NOT NULL,
UNIQUE PRIMARY INDEX UPI_CSO_TB ( ORDERS_MEAS_KY , ORDERS_PROC_DT ,ORDER_TRANS_CD )
PARTITION BY RANGE_N(ORDERS_PROC_DT BETWEEN DATE '1999-07-01' AND DATE '2020-02-01' EACH
INTERVAL '1' DAY )
The Join is on the SALES_ASSOCIATE_NBR column as well as PI column set. So something like inner join Mysandbox.Consolidated_orders MSI On
MSI.ORDERS_MEAS_KY=TB1.OMK and MSI. ORDERS_PROC_DT =TB1.OPD and MSI.ORDER_TRANS_CD=TB1.OTC Inner join MSI.SALES_ASSOCIATE_NBR=DIM.SAN
The problem is the key SALES_ASSOCIATE_NBR is joined as well as part of sel statement I can put in a rndm range and then use case in the Q but
how do I know the same rows are being retrieved because all other values in that rows associated with the key are not default. Just help me
understand this situation better ...
| |