Surrogate Key Question - forum topic by thompsonhab
Is there a way to generate a surrogate key dynamically using set processing rather than record level processing? We have a large amount of records in the source which we need to generate a unique...
View ArticleDIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX - response (4) by devxadmin
@KS42982,The formatting glitch has been repaired.
View ArticleSuggestion Required regarding derived table usage - response (2) by KS42982
You can create JI (Join INDEX) on the repeating tables/joins and make COGNOS go towards JI instead of tables directly, that would definately improve the performance.
View ArticleDIFF BETWEEN PRIMARY KEY AND PRIMARY INDEX - response (5) by KS42982
That's a good news. I am trying again here. PRIMARY KEY PRIMARY INDEX1 It cannot be NULL It can be NULL 2 It is not mandatory in Teradata It is mandatory in Teradata 3 It does not help in data...
View ArticleCovered Query - response (1) by dnoeth
Hi Rajeev, a Covering Index means that all of the columns needed to process a query are included in an existing index. The optimizer can use this index instead of scanning the base table, which usually...
View ArticleDifference between Create table Statements - response (9) by dnoeth
Which PI should the optimizer choose when you write a multi-table SELECT?When you do a CREATE TABLE AS SELECT you will loose all index info (probably resulting in a NUPI on the first column) and a...
View ArticleOptimizer's inability to resolve variables for partitioning - response (2) by...
Hi Sanjeev, at the time when the optimizer is creating the execution plan the actual rows in the CDC_BATCH table are unknown.As this seems to be a single row table i'd suggest replacing the CDC_BATCH...
View ArticleRedistribution with LOJ despite same PI - response (1) by dnoeth
You should post SQL/Explains because this is an unusual behavior.DIeter
View ArticleSurrogate Key Question - response (1) by KS42982
You can try something like below - SEL CSUM(1,(ADDR.ADDRESS_LINE1 || ADDR.ADDRESS_LINE2 || ..) ) + DT.MAX_ADDRESS_ID AS ADDRESS_ID FROM SOURCE.ADDRESS_TABLE ADDR, (SEL ZEROIFNULL(MAX(ADDRESS_ID))...
View ArticleQuery Tuning - response (11) by dnoeth
Hi MBR, cputime means the actual CPU seconds used, which is usually extracted from Teradata's query log DBQL.Dieter
View ArticleSurrogate Key Question - response (2) by dnoeth
Hi Todd, this is usually done using a Left Join of target/source and COALESCE(address_id, ROW_NUMBER + (SELECT COALESCE(MAX(address_id), 0) FROM target)))Dieter
View ArticleWill volatile tables be dropped? - response (10) by dnoeth
Your skeleton looks ok, without seeing the actual source it's hard to tell what's going wrong.Dieter
View ArticleSampled Stats vs Time trade-off - response (3) by dnoeth
For a table with a PI but no partitioning the sampling approach is usually ok, a table is sorted by RowHash -> not based on the order of inserts and looks quite random (for a NoPI table it *is* a...
View ArticleWill volatile tables be dropped? - response (11) by mjj
Hi, Give it a try.. Set your database to your working database. then compile the sp. It will show warnings "table temp1,2,3 already exists". Then drop all VTs manually and execute the sp. It will...
View ArticleHow to update the duplicate records in Teradata - forum topic by Siddesh
I have a requirement to update the duplicate records in teradata. For E.G. if col, col, col, col have same values in the table, those records are regarded as duplicates and duplicate flag needs to be...
View ArticleWill volatile tables be dropped? - response (12) by barani_sachin
sadly I cant show the full code; Thanks for u r time Dieter :) One more question on this, Lets say i dont have any Error handler in my code, 1) And all the VT's has been created 2) after that there is...
View ArticleWill volatile tables be dropped? - response (13) by dnoeth
No, the tables will not be dropped. Of course, due to the NO LOG, the affected table will be empty if it was target of a INS/UPD/DEL.DIeter
View ArticleCovered Query - response (2) by rajeev saravanan
Hi Dieter ,Thanks for the quick turnaround I would like to extent my understanding with a simple scenarioNow for example i have a set of 5 columns which are frequently queried and a particular query...
View ArticleCovered Query - response (3) by dnoeth
*All* columns you use in your query (SELECT or WHERE clause) must be within the index, of course this might be less than all columns defined in the SI.Additonaly details are in the Database Design...
View ArticleWill volatile tables be dropped? - response (14) by barani_sachin
Thanks Dieter :) @mjj - It didnt work.
View Article