Why don't you find the answer on your own. Create a table, load it with data, do a analyze compute on the table, check for stats, truncate the table and recheck for stats?
I think you missed the point? if you truncate the table the stats will remain
i think his question is whether we need to from maintenance perspective - from which the answer should be yes as the stats could make a difference if you still query the table
Unless the question was whether a truncate will clear down the stats to which the answer is no
thanks for answering my question, I have tested it out myself before I raised the question in here. here is what I wasn't sure: neither TRUNCATE or DELETE won't change the STATS of the table; however, I am not sure how Oracle will handle HWM on TRUNCATE versus DELETE.
I know DELETE won't reduce the HWM unless rebuild the table, and TRUNCATE won't have this problem. I am not sure how the optimizer will handle in these two scenarios so that I raised the question.
If you truncate a table, what difference does it make if there are stats? You will eventually load data and want to generate stats again. You could easily delete the stats on the table, but why bother?
Bookmarks