|
Archives of the TeradataForumMessage Posted: Fri, 26 Apr 2002 @ 11:18:33 GMT
Hi, Can anyone explain this to me , the first script according to the explain should take roughly 52 mins, however, it was cancelled after 9 hours. The second had the same estimated running time , but only took 4 mins. DDL and Stats shown below. We're running a 2 node 4700 , V2R3. Regards Trevor Price 1. CREATE VOLATILE TABLE CW1458D2 ( AREA_CODE CHAR(6) ,CALLED_NO CHAR(10) ,CALLED_EXCH CHAR(4)) ON COMMIT PRESERVE ROWS; INSERT INTO CW1458D2 SELECT C1.AREA_CODE ,C1.CALLED_NO ,L1.EXCH_CODE FROM CDW_PROD_BV.CALLED_INFO_V C1 JOIN CDW_PROD_BV.LINE_INFO_V L1 ON C1.STD = L1.STD AND C1.TELNO = L1.TELNO ; 2. CREATE VOLATILE TABLE CW1458D2 ( AREA_CODE CHAR(6) ,CALLED_NO CHAR(10) ,CALLED_EXCH CHAR(4)) PRIMARY INDEX(AREA_CODE, CALLED_NO); INSERT INTO CW1458D2 SELECT C1.AREA_CODE ,C1.CALLED_NO ,L1.EXCH_CODE FROM CDW_PROD_BV.CALLED_INFO_V C1 JOIN CDW_PROD_BV.LINE_INFO_V L1 ON C1.STD = L1.STD AND C1.TELNO = L1.TELNO ;
CREATE SET TABLE CDW_PROD_LINE.CALLED_INFO ,NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL ( ACC_NO INTEGER, STD CHAR(4) CHARACTER SET LATIN NOT CASESPECIFIC, TELNO CHAR(7) CHARACTER SET LATIN NOT CASESPECIFIC, AREA_CODE CHAR(6) CHARACTER SET LATIN NOT CASESPECIFIC, CALLED_NO CHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC) UNIQUE PRIMARY INDEX ( STD ,TELNO ) INDEX ( AREA_CODE ) INDEX ( CALLED_NO ); 02/04/19 23:06:15 164 AREA_CODE 02/04/19 23:07:56 2,890,961 CALLED_NO 02/04/24 10:22:55 4,265,804 STD,TELNO CREATE SET TABLE CDW_PROD_LINE.LINE_INFO ,NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL ( ACC_NO INTEGER, ACC_DIST CHAR(3) CHARACTER SET LATIN NOT CASESPECIFIC, CUST_TYP CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC, LINE_TYP CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC, SOC_CAT CHAR(2) CHARACTER SET LATIN NOT CASESPECIFIC, EX_DIRECTORY_IND CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC, CUST_LINE_STAT CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC, INST_LINE_CNT INTEGER COMPRESS 0 , EXCH_NAME CHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC COMPRESS ' ', EXCH_CODE CHAR(4) CHARACTER SET LATIN NOT CASESPECIFIC COMPRESS ' LINE_DIST CHAR(3) CHARACTER SET LATIN NOT CASESPECIFIC, STD CHAR(4) CHARACTER SET LATIN NOT CASESPECIFIC, TELNO CHAR(7) CHARACTER SET LATIN NOT CASESPECIFIC, PROV_DATE DATE FORMAT 'yyyymmdd') UNIQUE PRIMARY INDEX ( STD ,TELNO ); 02/04/20 00:43:33 1,856,434 ACC_NO 02/04/20 00:43:57 3 CUST_TYP 02/04/20 00:44:30 4 LINE_TYP 02/04/20 00:39:38 16,871 PROV_DATE 02/04/20 00:38:52 4,265,804 STD,TELNO
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||