
上QQ阅读APP看书,第一时间看更新
Getting ready
Let's connect to our local database instance and create a table using SQLA. Remember, PI is the only index that is not only used for data distribution but for retrieval also. Choosing a PI is the most important task. Bad PI has a ripple effect on queries. The following are some pointers for choosing a better PI:
- Consider data distribution
- The more unique the PI, the better the distribution across all AMPs on Teradata
- Understand how will the table be joined to
- Using the most frequent join path will improve joins to the table
- However, this column may be highly skewed
Let say we have 850 AMPs on a 20 node system. A user creates the following table, to store approximately 100,000 rows per day.