What is the difference between Primary Index and Secondary Index when using Teradata?

1 Answers
Answered by suresh

Primary Index vs Secondary Index in Teradata

Primary Index vs Secondary Index in Teradata

Primary Index and Secondary Index are two types of indexes used in Teradata for optimizing query performance. Here is the difference between the two:

  • Primary Index: The Primary Index in Teradata is used to distribute data evenly across AMPs (Access Module Processors) for efficient data retrieval. It is defined at the table level and determines how data is physically stored in the database. Each row in a table must have a unique primary index value.
  • Secondary Index: The Secondary Index in Teradata is an additional index created on one or more columns of a table to improve query performance for columns that are frequently used in WHERE clause conditions. Unlike the Primary Index, there can be multiple secondary indexes on a table, and they do not define the physical order of data storage.

Overall, Primary Index is essential for data distribution and retrieval, while Secondary Index helps in optimizing specific query conditions.

Answer for Question: What is the difference between Primary Index and Secondary Index when using Teradata?