Teradata Statistics MaxValueLength

1
232

 

In some rare cases, you may be forced to collect statistics on large character columns.

Probably you never recognized it, but, until release 13.10, Teradata was restricting the number of bytes considered for building the statistics histograms to 16.

This restricting means, all characters past the 16th bytes have been cut-off.

The column value “012345678901234567890” actually was considered as “0123456789012345”.

Cutting off after 16 bytes lead to wrong estimations which are tough to detect.

Teradata Statistics MaxValueLength is an enhancement to Teradata statistics, which improves the situation.

With Release 14, Teradata increased the number of considered bytes to 25 by default. If the 25 bytes are not enough, you can override this default value with below syntax:

COLLECT STATISTICS USINGMAXVALUELENGTH 100 COLUMN (<COLUMN>) ON <TABLE> ;

In above example, 100 bytes would be used to build the histogram on column <COLUMN>

 

Our Reader Score
[Total: 4    Average: 5/5]
Teradata Statistics MaxValueLength written by Roland Wenzlofsky on May 26, 2014 average rating 5/5 - 4 user ratings

1 COMMENT

  1. Can you show some examples in T13.10?

    So if I have a T1(col1 char(16),col2 char(20)), will the stats on (col1,col2) ignore col2? What does help stats show.

LEAVE A REPLY

Please enter your comment!
Please enter your name here