Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Friday, 20 June 2014

TeraData EXPLAIN Command


The EXPLAIN command is a powerful tool provided with the Teradata database. It is designed to provide an English explanation of what steps the AMP must complete to satisfy the SQL request. The EXPLAIN is based on the PE's execution plan.
The Parsing Engine (PE) does the optimization of the submitted SQL, the creation of the AMP steps and the dispatch to any AMP involved in accessing the data. The EXPLAIN is an SQL modifier; it modifies the way the SQL operates. 

When an SQL statement is submitted using the EXPLAIN, the PE still does the same optimization step as normal. However, instead of building the AMP steps, it builds the English explanation and sends it back to the client software, not to the AMP.
This gives users the ability to see resource utilization, use of indices, and row and time estimates.

Monday, 13 January 2014

TeraData SHOW command


The Teradata Database offers several types of help using an interactive client.
There are times when you need to recreate a table, view, or macro that you already have, or you need to create another object of the same type that is either identical or very similar to an object that is already created. When this is the case, the SHOW command is a way to accomplish what you need. The intent of the SHOW command is to output the CREATE statement that could be used to recreate the object of the type specified.

SHOW TABLE <table-name>; 
Displays the CREATE TABLE statement needed to create this table.