compression calculations - response (3) by Harpreet Singh
Adding days to TIMESTAMP WITH TIMEZONE column - forum topic by vidyadutt.s
Hello Experts,
I need to add some days to a timestamp with timezone value. Both values come from a table. Is it possible to use INTERVAL here? I tried the following, but it's throwing error.
SELECT Start_Date
,Count_Days
,Start_Date + INTERVAL Count_Days AS End_Date
FROM(
SELECT (CURRENT_TIMESTAMP - INTERVAL '18' DAY) AS START_DATE
,CAST(10 AS SMALLINT) AS COUNT_DAYS
)A
Then I extracted date, added the days, then concatenated it with the rest of timestamp from Start_Date. However, I'm not able to convert it back to Timestamp with Timezone. When I try, it's truncating the timezone part (+00:00).
SELECT Start_Date
,Count_Days
,CAST(CAST((CAST((CAST(Start_Date AS DATE) + Count_Days) AS CHAR(10)) || '' || SUBSTRING(CAST(Start_Date AS CHAR(32)) FROM 12)) AS CHAR(32)) AS TIMESTAMP FORMAT 'YYYY-MM-DDbHH:MI:SS.S(F)Z') AS End_Date
FROM(
SELECT (CURRENT_TIMESTAMP - INTERVAL '18' DAY) AS START_DATE
,CAST(10 AS SMALLINT) AS COUNT_DAYS
)A
I'm looking for you experts to help me out here.
Insert not working - forum topic by NewAmigo
I Have a master OLTP table A and Target table B (Built based on the source table A). The source table will get new data everymonth and i need to update the target table B using Insert (New Data) and update (modify existing) using the source data from A. So i am writing an Insert statement which should run every month which is not working..please help
Insert into TableB XX (a,b,c,d,e,f......) Select A, CSUM(1,1),C,D,E,F..... From TableA YY where YY.A<>XX.A;
Also, please provide the code for update stattement.
% improvement in collect stats after collecting - forum topic by DeepakDhabade
HI,
I am new to the TERADATA technology.
Can anyone give me idea about how to know the % improvement in CollectStats after collecting on tables or columns. ??
Generally we collect Stats on tables and there columns but I am not getting how it will improve the system performance and how to know the % improvement in system performance after collecting stats.
Is there any predefined steps to know the changes in Improvement ??
Is it possible that, after collecting stats the system performance will reduce ?? If yes then in which scenario ?? I heard that, over collecting stats will sometimes reduce the system performance.
Regards,
Deepak Dhabade
why we use sys_mgmt database in teradata - forum topic by DeepakDhabade
hi,
I am new to Teradata technology.
Can anybody let me know why we use sys_mgmt database in teradata. Is there any specific use of this SYS_MGMT. ??
Can anybody let me know the most used database names and why they use more in teradata ??
Regards,
Deepak Dhabade
Correcting the corrupted record - response (2) by Harpreet Singh
first and third row are with same group (empno,ename, cod). question is not clear. are you looking
SEL T.*, min(DW_EFF_DT) over (PARTITION BY EMPNO,ENAME,COD) from bbc T
Adding days to TIMESTAMP WITH TIMEZONE column - response (1) by Fred
In the first case, just use Start_Date + Count_Days * INTERVAL '1' DAY.
In the second, you need to say you want the time zone, i.e. CAST(... AS TIMESTAMP WITH TIME ZONE)
How is a Teradata SQL query parsed and executed? - response (2) by tdfan
Thanks Raja
Insert not working - response (1) by Raja_KT
Are you allowed to use merge? ???? when matched then ..when not matched then .....
Have a look at the syntax.
Cheers,
why we use sys_mgmt database in teradata - response (1) by krishaneesh
DBC tables have the querylogs and other information if the logging is enabled. SYS_MGMT(PDCRINFO) is the database which holds the historical information for those which are present in DBC. Querying on the database requires access on the many tables in DBC and in order for these to be faster, it is recommended to keep the DBC as lean as possible. Hence data from the DBC is transferred into the corresponding tables on SYS_MGMT. For a detailed list of the databases please refer to the documentation.
SET tables - forum topic by Nishant.Bhardwaj
Hi Experts,
As i am preparing for certification so wanted that cofirm that Is the below statement true or false ? I think its false..
SET tables during a MultiLoad are limited to 16 indexes.
I searched in the documentation but couldn't find it.
Thanks in advance
Regards,
Nishant
How to restore perticular TABLE from backup location in TERADATA. - response (5) by DeepakDhabade
Thanks Krishna for the update.
How to reduce duplicate Access Rights entries from Teradata database - response (2) by DeepakDhabade
Thanks Kishore for the update.
why we use sys_mgmt database in teradata - response (2) by DeepakDhabade
Thanks krishna for update.
Performance Tuning - Report for analysis - response (2) by tssr_2001
Where can i find the documents related to PDCR, PMCP, TPERF reports :
a. How to install these reports
b. How to generate these reports
c. How to interpret the report
Performance Tuning - Report for analysis - response (3) by VandeBergB
Tssr,
Generally those are available as part of a performance tuning engagement provided by the Performance COE @ Teradata.
Cheers
How is the Node Decided - response (3) by mithunganguly
Thanks bth for the explanation. It was quite informative.
Regards,
Mithun
How is the Node Decided - response (4) by dnoeth
@HTH:
the Bynet doesn't look at the table header, it simply does a lookup in the Hashmap.
Each system has a so-called Hashmap which is specifically created (during sysinit) for that system and determines the AMP on which a row is stored. This Hashmap is is an array of 1048576 values, each value is the number of an AMP.
SELECT HASHAMP(HASHBUCKET(HASHROW(value))) returns the AM responsible for value.
How is teradata sales accomplished - forum topic by blueash
1. What includes the price?
2. Amps? PE? per Node?
3. What are optional "add on items" ? Temporals? Utilities? TPT? etc
Is there a document that talks about these things?
Query band in procedure. SET QUERY_BAND ';' UPDATE FOR SESSION;" - response (4) by pauldancer
I also have a requirement to set query_band dynamically inside a stored procedure and setting it for each TRANSACTION is not a very desirable option.
I have managed to get this to work for SESSION by settnig it inside an External Java Stored Procedure. I can call the JXSP from my stored procedure and it seems to work fine.
Not sure if I am breaking some fundamental principle of query bands but it works.
cheers,
Paul
Bteq script can be used to calculate best options for MVC by considering datatypes, frequency of repeating values, distinct value count. This MVC list can then be reviewed for actual perm space saving and used.
Regarding 4 point from Krishaneesh, varchar(100) will be able to support what char(100) was doing and also save spaces on mostly 20 character data.