3 Teradata Interview Questions and Answers
3 Teradata Interview Questions and Answers
EXPLAIN select last_name,first_name FROM employees; The EXPLAIN parses the SQL statement but does not execute it. This provides the designer with an "execution stratergy". The execution stratergy provides what an optimizer does but not why it choses them. The EXPLAIN facility is used to analyze all joins and complex queries.
What is an optimization and performance tuning and how does it really work in practical projects?
Answer-1: Performance tuning and optimization of a query involves collecting statistics on join columns, avoiding cross product join, selection of appropriate primary index (to avoid skewness in storage) and using secondary index. Avoiding NUSI is advisable.
How teradata makes sure that there are no duplicate rows being inserted when its a SET table?
Answer-1: Teradata will redirect the new inserted row as per its PI to the target AMP (on the basis of its row hash value), and if it find same row hash value in that AMP (hash synonyms) then it start comparing the whole row, and find out if duplicate. If its a duplicate it silently skips it without throwing any error.
2/7
Answer-1: load uses 2 error tables Error table 1: where format of data is not correct. Error table 2: violations of UPI Mload also uses 2 error tables (ET and UV), 1 work table and 1 log table 1. ET TABLE - Data error MultiLoad uses the ET table, also called the Acquisition Phase error table, to store data errors found during the acquisition phase of a MultiLoad import task. 2. UV TABLE - UPI violations MultiLoad uses the UV table, also called the Application Phase error table, to store data errors found during the application phase of a MultiLoad import or delete task 3. WORK TABLE - WT Mload loads the selected records in the work table 4. LOG TABLE A log table maintains record of all checkpoints related to the load job, it is essential/madatory to specify a log table in mload job. This table will be useful in case you have a job abort or restart due to any reason.
3/7
comprison to V2R5 while if data from one system has been vanishes. After creating tables dynamically in the Teardata, where is the GRANT table option usually done ? When tables are newly created, what is the default role and
What is cliques? What is Vdisk and how it will communicate with physical data storage at the time of data retrieval through AMP ?
Answer-1: A clique is a set of Teradata nodes that share a common set of disk arrays. Cabling a subset of nodes to the same disk arrays creates a clique. Each AMP vproc must have access to an array controller, which in turn accesses the physical disks. AMP vprocs are associated with one or more ranks (or mirrored pairs) of data. The total disk space associated with an AMP is called a vdisk. A vdisk may have up to three ranks. Hence Vdisk will communicate with physical storage through array controllers.
4/7
5/7
If you want to load, empty table then you use the fastload, so it will very usefull than the mutiload..because fastload performs the loading of the data in 2phase..and it noneed a work table for loading the data.., so it is faster as well as it follows the below steps to load the data in the table Phase1-It moves all the records to all the AMP first without any hashing Phase2-After giving endloading command, Amp will hashes the record and send it to the appropriate AMPS . Multiload: It does the loading in the 5 phases Phase1:It will get the import file and checks the script Phase2:It reads the record from the base table and store in the work table Phase3:In this Application phase it locks the table header Phase4:In the DML opreation will done in the tables Phase 5: In this table locks will be released and work tables will be dropped.
6/7
What are two examples of an OLTP environment? # Transactions take a matter of seconds or less. # Many transactions involve a small amount of data.
Answer-1: On Line Banking On Line Reservation (Transportation like Rail, Air etc.) Answer-2: 1- ATM 2- POS Answer-3: OLTP is typified by a small number of rows (or records) or a few of many possible tables being accessed in a matter of seconds or less. Very little I/O processing is required to complete the transaction. For eg. 1. This type of transaction takes place when we take out money at an ATM. Once our card is validated, a debit transaction takes place against our current balance to reflect the amount of cash withdrawn. 2. This type of transaction also takes place when we deposit money into a checking account and the balance gets updated. We expect these transactions to be performed quickly. They must occur in real time.
7/7