COLLECT STATISTICS on Empty table

Database
Enthusiast

COLLECT STATISTICS on Empty table

How COLLECT STATISTICS works on a empty table.Pls clarify if some body is having some idea.

Thanks
1 REPLY
Teradata Employee

Re: COLLECT STATISTICS on Empty table

COLLECT STATISTICS on specific index(es) or column(s) of an empty table makes those statistics non-NULL in the dictionary tables so you can use the "refresh" form of the commmand later (COLLECT STATISTICS ON table ;-) .

And it tells the optimizer with "high confidence" that the table is empty. That may be good if you leave it empty, but likely very bad if you populate it with data and forget to refresh the statistics.