BTEQ

Tools & Utilities
Enthusiast

BTEQ

Is collect stats on primary index of global temporary table not possible?
5 REPLIES
Enthusiast

Re: BTEQ

You can collect stats on GTT.
I think normal collect stats statement will work only before GTT materialized.
Once the GTT materialized just try using ‘Temporary’ keyword…
Enthusiast

Re: BTEQ

the codes like this
create set global temporary table gt_temp,
no fallback, log
(
tid decimal(15,0)
qt integer
) unique primary index(tid)
on commit preserve rows;

insert into gt_temp
(tid, qt)
sel tid ,qt from table1;

collect statistics on temporary gt_temp
index tid;

Will the above collect stats statement work?
Enthusiast

Re: BTEQ

That should work. The word "Temporary' is the key.

Enthusiast

Re: BTEQ

The above collect stats statement is not working...........
3706: Syntax error: Index name not allowed with TEMPORARY key word
Enthusiast

Re: BTEQ

that works....... i just missed the paranthesis (tid)
thanks a lot