Unless you are still using Oracle 8i, you CAN gather statistics on GTTs:
14:01:15 ora92.scott> create global temporary table gt on commit preserve rows 14:01:37 2 as select * from dba_objects where rownum <= 1000 14:01:45 3 /
Table created.
14:01:46 ora92.scott> commit;
Commit complete.
14:01:50 ora92.scott> select count(0) from gt;
COUNT(0) ---------- 1000
1 row selected.
PL/SQL procedure successfully completed.
14:02:10 ora92.scott> @tblstats gt
1 row selected.
14:02:15 ora92.scott> At 09:03 AM 8/28/2005, Rajesh.Rao@xxxxxxxxxxxx wrote:
The main disadvantage with global temporary tables, is that you cannot gather statistics for them (unless a hint is provided), and hence, the optimizer might not choose an optimal plan, especially when you join GTT's with permanent tables in your transactions. Second, is that if you have
Regards
-- //www.freelists.org/webpage/oracle-l