Explain plan for set table - response (7) by VBurmist
Hi Abin, it is possible to measure. Create two similar tables - one set and one multiset, with the same data. Insert same new data into both tables. Ant then measure CPU consumption in the DBQL...
View ArticleError 5505 Column data types cannot be specified with a WITH [NO] DATA...
I get this error when I create the second of following statements and do not know why.Statement 1: CREATE VOLATILE TABLE wow ( id DEC(18,0) ) UNIQUE PRIMARY INDEX(item_id) ON COMMIT PRESERVE...
View ArticleExplain plan for set table - response (8) by abin
Thanks Vlad for suggestion, I will check this and get back in case of any more questions. Abin
View ArticleNeed help getting rid of parcel length error in BTEQ script - response (1) by...
Hi, When you import a file using BTEQ Import, Bteq try to combine as many records in a parcel as it can fit. So in your case you parcel length is exceeding the length CLI can handle. You can avoid this...
View ArticleTrimming Blank Inner Spaces & Data Cleansing - response (2) by woworsky
Dependend on your Teradata version you also can use the regex_replace function. It is available since version TD 14.00 something like: SELECT REGEXP_REPLACE(' AA 123 ', '[\s]', '', 1, 0, 'c')BR Armin
View ArticleNeed help getting rid of parcel length error in BTEQ script - response (2) by...
The default PACK factor in BTEQ is always 1, so changing it will not fix the problem. REPORT format expects only fixed length CHARs, when you define a VARCHAR the first two chars are treated as the...
View ArticleCount the number of words in a phrase using Teradata SQL - response (1) by...
Hi Sreechandn, If you are in TD Version 14, then you can make use of regex_replace function along with length function. Another easier way, I always follow is use a procedure, because I can handle any...
View ArticleError 5505 Column data types cannot be specified with a WITH [NO] DATA...
Hi, Are you using the column correctly? Please check it. Cheers, Raja
View ArticleNeed help getting rid of parcel length error in BTEQ script - response (3) by...
Hi Diether, That is a good addition to my knowledge, thanks for correcting me :)
View ArticleError 5505 Column data types cannot be specified with a WITH [NO] DATA...
HI, You are defining a column name as id, and in PI clause you are specifying item_id which do not exist. else the statement is working fine. you can try CREATE VOLATILE TABLE wow ( id DEC(18,0) )...
View ArticleRe-writing a query interms of performance - forum topic by bikky6
CREATE MULTISET TABLE KEY_T ,NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, CHECKSUM = DEFAULT, DEFAULT MERGEBLOCKRATIO ( DW_CREAT_DT DATE FORMAT 'YYYY-MM-DD' NOT NULL, VISITOR_ID INTEGER NOT NULL,...
View ArticleError 5505 Column data types cannot be specified with a WITH [NO] DATA...
Hi Khurram, Thanks for your answer. It was my fault that I copied and pasted it incorrectly. I have tried your suggestion of course before I wrote to this forum. So the creation of the table works...
View ArticleRe-writing a query interms of performance - response (1) by Raja_KT
Hi, I can see that the two tables have UPIs with only 1 column matching. Have you thought of creating AJI and see the preformance? Cheers, Raja
View ArticleRe-writing a query interms of performance - response (2) by dnoeth
All those unique indexes seem suspicious, are they actually based on access/join paths or do they just implement the logical keys? A NUPI (FIRST_DT ,VISITOR_ID) on T_CUST would allow a direct join...
View ArticleRe-writing a query interms of performance - response (3) by bikky6
Sure Deiter,Please find the below explain plan.It is showing as 2 min .But when I execute it,it takes more than 45 mins..1) First, we lock KEY_T in view KEY_1 for access, and we lock CUST_T in view...
View ArticleCount the number of words in a phrase using Teradata SQL - response (2) by...
Hi Sree, I have created a stored procedure to count the number of words in a string, hope it will help you! REPLACE PROCEDURE SAMPLES.WordCount ( IN InputString VARCHAR(4000) , OUT WCount INT ) BEGIN...
View ArticleRe-writing a query interms of performance - response (4) by dnoeth
The explain looks like expected, redistributing CUST_T and then a local join to KEY_T. There's "no confidence" for join and aggregate (which stats are collected?), if the actual number is much larger...
View ArticleRe-writing a query interms of performance - response (5) by bikky6
For CUST_TDate Time Unique Values Column Names 13/11/24 1:57:25 1,090 FIRST_DT 13/11/24 1:58:15 163,402,379 VISITOR_ID 13/11/24 1:58:39 4,192,811 CUST_ID 13/11/24 1:58:52 4 DOMN_ID 13/11/28 5:28:33...
View ArticleRounding hour and minute from time stamp to the closest hour - forum topic by...
Hi All, I need to round this: zc.solved_at_ts (FORMAT 'HH:MI') (CHAR(5)), to the closest hour. ex if 16:35 then 17:00 and if 16:29 then 16:00 Round function did not work. Any ideas? It needs to be...
View ArticleRe-writing a query interms of performance - response (6) by M.Saeed Khurram
Hi Bikky, I was just analysing your scenaio, and got this link, just read the disadvantages of PPI and I hope you will be able to optimize your...
View Article