The following table provides a more explicit procedure:
- Create a new base table on the Teradata platform with a definition that matches the definition for the legacy table as closely as possible.
Do not define any secondary indexes on this base table at this stage of the process.
- Use a Teradata load utility to load the newly defined base table with a representative sample of rows from the legacy table. The loaded sample must reflect the demographics of the entire population of the legacy table and be a precise percentage of the cardinality for that table.
- Query the system view (see Querying DBC.TableSizeV) for the space occupied by the new base table.
- Record the number of bytes returned by the query.
- Add a secondary index to the table.
- Query the system view again for the space occupied by the new base table and the new secondary index.
- Record the number of bytes returned by the query.
- The arithmetic difference between the numbers you recorded in step 4 and step 7 is the size of the newly defined secondary index.
- Iterate step 5 and step 6 until you have finished adding all the secondary indexes you anticipate defining for this table.
- Repeat the procedure with another legacy table until you have estimated the initial size of your entire database.
- Evaluate the sizes of any join indexes (and any secondary indexes defined on join indexes) you anticipate using with the new database.