Re: Partitioned table space stats ... Incremental question and TEMP tablespace usage...

From: Greg Rahn <greg_at_structureddata.org>
Date: Thu, 22 Mar 2012 08:34:47 -0700
Message-ID: <CAGXkmiu5F3td71SXDOAfT3LQD2BK6h0TJQS=UTZnZ4388-qLmw_at_mail.gmail.com>



What sql statement (from dbms_stats) is the one spilling to temp and failing?
Gathering table stats should not spill to temp with AUTO_SAMPLE_SIZE. This is because there is no sort in 11g when using AUTO_SAMPLE_SIZE due to the fast NDV algorithm. If you switch to a percent, it will require a sort and may spill to temp as well.

FYI - only the first (incremental) set_table_prefs is required -- the other two are the defaults already.

On Thu, Mar 22, 2012 at 8:12 AM, David Mann <dmann99_at_gmail.com> wrote:

> This is a generic 11.1.0.7 (straight install with no patches) on Solaris
> 64-bit
>
> Table MYSCHEMA.MYTABLE has 42 partitions, 15 gb across all partitions,
> largest partition is 1.75gb, but most are in the 300mb range.
>
> I have 64gb temp space defined for this database, and no one else is
> logged on.
>
> I have the table stats preferences configured like this:
>
> EXEC DBMS_STATS.set_table_prefs('MYSCHEMA', 'MYTABLE', 'INCREMENTAL',
> 'TRUE');
> EXEC DBMS_STATS.set_table_prefs('MYSCHEMA', 'MYTABLE', 'GRANULARITY',
> 'AUTO');
> EXEC DBMS_STATS.set_table_prefs('MYSCHEMA', 'MYTABLE',
> 'ESTIMATE_PERCENT', DBMS_STATS.AUTO_SAMPLE_SIZE);
>
> And then execute the following:
> EXEC DBMS_STATS.gather_table_stats('MYSCHEMA', 'MYTABLE',DEGREE=>4);
>
> The stats gathering chugs along and after about 45 minutes it fails with:
> ERROR at line 1:
> ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
> ORA-06512: at "SYS.DBMS_STATS", line 18408
> ORA-06512: at "SYS.DBMS_STATS", line 18429
> ORA-06512: at line 1
>
>

-- 
Regards,
Greg Rahn  |  blog <http://bit.ly/u9N0i8>  |  twitter <http://bit.ly/v733dJ>  |
 linkedin <http://linkd.in/gregrahn>


--
http://www.freelists.org/webpage/oracle-l
Received on Thu Mar 22 2012 - 10:34:47 CDT

Original text of this message