Teradata Database Message 6852 - 6852 - Analytics Database - Teradata Vantage

Teradata® VantageCloud Lake - Analytics Database Messages

Edition
Lake
Product
Analytics Database
Teradata Vantage
Published
October 2022
Language
English (United States)
Last Update
2024-02-26
dita:mapPath
tzr1629746512312.ditamap
dita:ditavalPath
ft:empty
dita:id
vza1585613049811
lifecycle
latest
Product Category
Teradata® Vantage™
Message
PARTITIONS WHERE clause needs to be simplified
Explanation
The user is trying to perform an archive or restore operation of selected partitions but the PARTITIONS WHERE condition defining the partitions selected all the partitions. Or, if the ALL PARTITIONS clause was specified for a restore, the well-defined bounding condition from the archive is not compatible with the current partitioning of the table. This can happen if the condition references columns that are not partitioning columns or if the condition is not compatible with the current partitioning of the table. For ALL PARTITIONS , even if the bounding condition is well-defined, this error may occur if the partitioning of the table has changed significantly due to altering of the partitioning. This error may also occur if the user is trying to perform a selected partitions archive or restore operation of a PPI table having one or more TIMESTAMP partitioning columns.
Generated By
OPT modules.
For Whom
End User.
Notes
None
Remedy
If you specified ALL PARTITIONS, resubmit specifying an appropriate condition in a PARTITIONS WHERE clause. If you specified a PARTITIONS WHERE condition, you may need to rewrite the condition to be simpler such that is selects the desired partitions. You can try "hard-coding" the PARTITIONS WHERE option by using the system-derived PARTITION column. Experiment with EXPLAINs of a simple SELECT query using various WHERE condition formulations and when you have something that will only scan a limited number of partitions, re-submit the job. Alternatively, you can always resort to full-table archive or restore by removing the PARTITIONS WHERE option; if doing a restore, you may want to restore into a staging table, delete desired rows from the target table, and then insert-select the appropriate rows into the target table.