dropping partition statistics

Database
Enthusiast

dropping partition statistics

Hello,

I am attempting to alter a table by adding ranges to the partition.  I cannot do this because statistics exist on the partition.  I have tried:

drop statistics on <databasename.tablename>  column partition;

drop statistics on <databasename.tablename> column <columnname>;

Neither resolves my issue.

Any suggestions?

2 REPLIES
Enthusiast

Re: dropping partition statistics

Do you get error while running DROP STATS statements that you mentioned or you could run that statements successfully but still not able to alter a table to add range because of some stats are still there on some partitions ? Not clear on where you getting an issue.

Enthusiast

Re: dropping partition statistics

I'm sorry.  The DROP STATS statements executed successfully.

The attempt to alter the table to add partitions errored out.

However, I found the problem.  The partitions was included in a multi-column statistic as well as on its own.  Once I dropped those stats as well, I was able to alter the table.

Thank you for replying.