Viewing statistics on materialised global tempoary tables

Database
Enthusiast

Viewing statistics on materialised global tempoary tables

Hello,

can anyone out there help please?!

I've got a GTT with some initial stats collected, on the base table.

After logging in and inserting some data into the GTT I then recollect stats on the materialised GTT (COLLECT STATISTICS TEMPORARY ).

How do I then see the stats that TD has collected? I've tried using

COLLECT STATISTICS TEMPORARY
;

but I get the error message

3707: Syntax error, expected something like a name between the 'statistics' keyword and the 'temporary' keyword.

I'm using v2r5.1 and the above statement is straight out of the TD PDF manuals (for v2r5.1).

What am I doing wrong, please!?

Cheers,

Mark
5 REPLIES
Enthusiast

Re: Viewing statistics on materialised global tempoary tables

To view statistics on the table, use "HELP STATISTICS", not "COLLECT STATISTICS":

HELP STATISTICS TEMPORARY xxx;

where xxx is your table name.

Hope that helps!
Enthusiast

Re: Viewing statistics on materialised global tempoary tables

what a shocking typo!

I meant I've been trying

HELP STATISTICS TEMPORARY xxx ;

and I'm getting that error messsage.

Ant ideas?
Enthusiast

Re: Viewing statistics on materialised global tempoary tables

I tried the same thing now on 6.1 and got the same error. Could this be a bug? It looks like the stats are being captured ok, since I change the number of rows in my table and then re-collect stats and the explain then reflects the new number of rows.

I would report it as an incident if nobody comes up with an answer on this forum.
Enthusiast

Re: Viewing statistics on materialised global tempoary tables

It's a documentation defect.

The correct syntax is

HELP TEMPORARY STATISTICS MYGTT;

There's a DR (96689) already in place to change the documentation.
Enthusiast

Re: Viewing statistics on materialised global tempoary tables

Many thanks to you all for helping me out on this one.

There's a drink on the bar for you.