Spool space error 2646 collecting statistics

Database
Enthusiast

Spool space error 2646 collecting statistics

This is a new one for me.  When I run the command below, I get a spool error.  The table has about 620 million rows in it.  Can someone please suggest what I need to do in order to resolve this?

COLLECT STATISTICS

  USING THRESHOLD 5 PERCENT

    AND THRESHOLD 7 DAYS  

  COLUMN (EDW_CHECKSUM1) ON DW_ACQ_T.CLY_CLARITY_TDL_TRAN;

Thanks!

1 REPLY
Teradata Employee

Re: Spool space error 2646 collecting statistics

The obvious answer is raise the spool space limit, or possibly to use sampled statistics. But another thing to check is whether EDW_CHECKSUM1 is a VARCHAR/VARBYTE field that has been defined with excessive maximum length. (Values may be temporarily padded to the max length in spool.)