Collect stats on very small tables

Database
Enthusiast

Collect stats on very small tables

How important is collecting stats on very small tables when its columns are used in joins..?
1 REPLY
Highlighted
Teradata Employee

Re: Collect stats on very small tables

Very small tables (my definition is <1-2K rows per AMP) are very important to collect stats on - and cheap to do. When there are a small number of rows per AMP the optimizer doesn't get to see enough of a sample to give accurate estimates. Collect on the PI and any join or selective where columns. Then look closely at the estimates in the explain.