The TDMaps database, and its tables and views, stores metadata that is used by the system when moving tables to new maps. TDMaps also contains SQL procedures that perform tasks related to system expansion.
The procedures and tables defined within TDMaps fall into two general categories: Advisor and Mover. Advisor procedures are responsible for analyzing user tables within logged query plans to make recommendations for moving a set of tables onto new maps. The recommendations can optionally be customized by callers and then input to the Mover. Mover procedures are responsible for moving the data for a specified list of tables onto new maps.
Users can issue SELECT statements to view the data in the views. For example, select all the rows from the action history view:
SELECT * FROM TDMaps.ActionHistoryVX;
TDMaps provides the following views used by Advisor procedures:
- ActionsV[X] – list of planned map actions for a table or database. The advisor populates the ActionsTbl and the mover reads the actions from the table and schedules them for execution. Available actions are: move a table to a new map or do not perform any action on the table for the specified destination map. This is a is a secure zone constrained view. ActionsVX returns only objects to which the user has access.
- ExclusionListsV[X] – list of databases, tables, join indexes, and hash indexes that are not to be moved. The CreateExclusionList table is created by calling CreateExclusionListSP. This is a secure zone constrained view. ExclusionListsVX returns only the objects to which the user has access.
- MapListsV[X] – list of maps and the maps included within each list. This is a secure zone constrained view. MapListsVX returns only the maps to which the user has access.
- ObjectListsV[X] – list of databases, tables, join indexes, and hash indexes. This is a secure zone constrained view. ObjectListsVX returns only the objects to which the user has access.
- SettingsV – stores settings that are used by the stored procedures and views. Please contact Teradata Support for assistance before making changes to SettingsTbl.
- TableToSparseMapSizingV[X] – identifies which map the Advisor thinks a table should be in. This view can be joined with the ObjectUseCountV view to get object usage information: the DatabaseName and TableName columns in TableToSparseMapSizingV can be joined with the DatabaseName and ObjectName columns in ObjectUseCountV. This is a is a secure zone constrained view. TableToSparseMapSizingVX returns only objects to which the user has access.
TDMaps provides the following view used by Mover procedures:
- ActionHistoryV[X] – lists map related actions that are running or have completed. The ActionHistoryTbl is updated by the mover procedure. After the mover takes an action from the ActionsTbl, it inserts a row into ActionHistoryTbl and sets its status to In Progress. After the action completes, the mover updates the status to Complete. This is a secure zone constrained view. ActionHistoryVX returns only the objects the user has access to.