Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: GLOBAL TEMPORARY TABLE in Oracle 9.2.0.4
The bug I was talking about was specific to the temporary tables needed by bitmap join indexes not being dropped. I was quoting it only as an example of the fact that sometimes Oracle doesn't clean up properly.
Oracle has a good reason for creating these GTTs, but I think the stats ones should be dropped as part of the dbms_stats package.
The fact that they sometimes appear is a cost-based thing. Oracle decides whether it would be cheaper to copy the relevant data once, then use the copy, or whether it would be quicker just to hack through the data.
You probably get the GTTs when Oracle decides that a small sample will be sufficient. I haven't really looked into the details. (So much to test, so little time).
Regards
Jonathan Lewis
http://www.jlcomp.demon.co.uk
The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html
April 2004 Iceland http://www.index.is/oracleday.php June 2004 UK - Optimising Oracle Seminar July 2004 USA West Coast, Optimising Oracle Seminar August 2004 Charlotte NC, Optimising Oracle Seminar September 2004 USA East Coast, Optimising Oracle Seminar September2004 UK - Optimising Oracle Seminar
In two of 9.2.0.4 databases we see these TEMPORARY tables pop up when the D= BMS_STATS job runs. The tables are not dropped for some reason after the DBMS_STATS job is completed (we do analyze stale rows using the m= onitoring feature). Though we run the DBMS_STATS every day, these temporary tables pop up certain days only, and the table structures differ.
We have been manually dropping these tables from the SYS schema.=20
Jonathan,
Is the bug you were referring to related to the temporary tables being crea=
ted during DBMS_STATS and not dropped, or generic bugs on GTTs...
B.
![]() |
![]() |