Presentation is loading. Please wait.

Presentation is loading. Please wait.

Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata Physical Database Design Considerations.

Similar presentations


Presentation on theme: "Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata Physical Database Design Considerations."— Presentation transcript:

1 Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata Physical Database Design Considerations

2 Primary Index Choice Criteria Access Demographics – Choose the column most frequently used for access to maximize the number of one AMP operations. Distribution Demographics – Better distribution optimizes parallel processing. Volatility – Changing PI may cause the row itself to be moved to another AMP. Stable PI reduces data movement overhead.

3 UPI and NUPI UPI  Best distribution due to unique value.  One AMP operation and uses only one I/O.  Best performance. NUPI  Good distribution for ‘near unique’ values.  Duplicate PI rows goes to same block. No extra I/O if all duplicate rows fit in single block.  Duplicate row check required if there is no USI defined.  Multiple I/Os required if rows do not fit in a single data block.

4 UPI and NUPI (cont.) Highly non-unique values cause skewed distribution. Highly non-unique values cause extra overhead in duplicate row check. Define a USI on the table whenever you have a NUPI. Note : FastLoad and Multiload can not load a table with USI defined.

5 UPI and NUPI (cont.) Multi-Column PI gives better distribution. But as the number of column increases the index becomes less usable. Partial values can not be used for PI access. Do not include a column for index selection that does not improve the selectivity of the index.

6 Secondary Indexes Secondary Index values are stored in sub tables. May be unique or non unique. Teradata implements USI and NUSI differently. SI ValueBT Row ID SI valueBT Row ID Sec. Index value Hash Algorithm Base Table Index Subtable

7 Secondary Indexes USI are hash distributed across all AMPs.  Sub table rows may reside in a AMP other than the base table row.  USI access involved two-AMP operation. NUSI are implemented on a AMP local basis.  Sub table rows located in the same AMP of base table rows.  NUSI access involved all-AMP operation.

8 Secondary Index Considerations Need additional storage to hold sub-table. Need additional I/O. Choose columns for NUSI candidate only those having frequent access. If “COLLECTed STATISTICS” are not available Teradata may not choose NUSI as the access path. Use EXPLAIN facility to see the plan chosen by the optimizer.

9 NUSI Bit Mapping Used when multiple NUSI are being used will AND condition. Identifies common Row Ids in the satisfied by the query before retrieving the base table rows. Indx1 Indx2 Multiple-column secondary indexes are less usable. Define multiple secondary indexes to allow bit mapping.

10 Row Access Methods PI Value Hashing Algorithm Base Table Sub Table NUSI Value Hashing Algorithm USI Value Hashing Algorithm Value Hashing Algorithm PI/NUPI USINUSIFTS

11 Questions ?


Download ppt "Last Updated : 27 th April 2004 Center of Excellence Data Warehousing Group Teradata Physical Database Design Considerations."

Similar presentations


Ads by Google