Predicate references non-partition column 'customerid'. Only the partition columns may be referenced: 
OPTIMIZE works for partitioned columns only.??....i am using unpartioned table
03/09/2023, 12:18 PM
You can optimize an entire table. The predicate is if you want to optimize a partition at a time instead of the full table.
Are you trying to zorder by customerid?
03/09/2023, 12:20 PM
i am trying to optimize using where clause on customerid.....zorder also gives same error with where clause
03/09/2023, 12:22 PM
Optimize changes the files and does some compaction. The where clause if the data is partitioned, it lets you do it part by part instead of the entire table. If the data is not partitioned, you can’t put a where clause and would just do