15.00 - 6852 PARTITIONS WHERE clause needs to be simplified - Teradata Database

Teradata Database Messages

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1096-015K
Language
English (United States)

6852 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.

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.