Change based threshold option for collect stats

Database
Enthusiast

Change based threshold option for collect stats

Hi,

I need to delete and reload a large table every day. Though there may not be huge change on the data. If I use below statement will it work? My understancding is collecting unnecessary stats can degrade overall performance. I don't wnat to collect stats if there is not more than 10% change in data.

COLLECT STATISTICS USING THRESHOLD 10 PERCENT

 After I collected stats on multiple columns on a table like:

COLLECT STATISTICS COLUMN (COL1, COL2), COLUMN (COL3) ON T1.

If I do COLLECT STATISTICS ON T2 will it refresh the above column level stats also?

I found that threshold option is not working for table level stats collection. Any reason?

Tags (1)
2 REPLIES
Enthusiast

Re: Change based threshold option for collect stats

Hi All,

Any help on this?

Enthusiast

Re: Change based threshold option for collect stats

if your scenario is to delete data and reload (turncate and load) threshold part will be skipped since data is deleted and for Teradata all data is changed and insertion again will not be calculated based on old/deleted data. So whatever threshold you will set, it is anyways going to collect full stats after truncate and load.