Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: GLOBAL TEMPORARY table - serious join performance problem
Jonathan Lewis wrote:
> Read about dynamic sampling.
>
> Use a level where all tables without
> statistics are sampled at run time, and
> your problem will go away.
That does the trick.
I added /*+ dynamic_sampling(gtt 1) */ and the query works FASTER than a real table (about 15% faster) and the execution plan is logical once again.
One note that should be in the docs is that if the table has an alias in the statement then only the alias name can be used in the hint. The full table name is ignored in that case.
Thanks for your assistance. Received on Thu Sep 23 2004 - 12:33:03 CDT