Sie sind auf Seite 1von 2

All AMP Operations vs Full Table Scan All AMP Operation (NUSI) : 1. The SQL is submitted, specifying a NUSI.

The hashing algorithm calculates a row hash value for the NUSI . 2. All AMPs are activated to find the hash value of the NUSI in their index subtables. The AMPs whose subtables contain that value become the participating AMPs in this request The other AMPs discard the message. 3. Each participating AMP locates the row IDs (row hash value plus uniqueness value) of the base rows corresponding to the hash value. 4. The participating AMPs access the base table rows, which are located on the same AMP as the NUSI subtable. 5. The qualifying rows are sent over the BYNET to the PE, and the PE sends the answer set on to the client application .

Full-Table Scan : (Accessing data with out indexes) : If the request does not use a defined index, the Teradata Database does a full-table scan. A full-table scan is another way to access data without using Primary or Secondary Indexes. In evaluating an SQL request, the Optimizer examines all possible access methods and chooses the one it believes to be the most efficient. A request could turn into a full-table scan when: The SQL request searches on a NUSI column with many duplicates. An SQL request uses a non-equality WHERE clause on an index column. An SQL request uses a range WHERE clause on an index column. For all requests, you must specify a value for each column in the index A Full Table Scan (FTS) is a query that reads every row of a table. Scenarios Full table scan occurs 1. Where clause in SELECT statement does not use either primary index or secondary index.

2. SQL Statement which uses a partial value (like or not like), in the WHERE statement. 3. SQL Statement which does not contain where clause. 4.SQL statement using range in where clause. Ex. (col1 > 40 or col1 < =10000)

Das könnte Ihnen auch gefallen