|
|
Archives of the TeradataForum
Message Posted: Wed, 12 May 2004 @ 20:07:17 GMT
Subj: | | Re: Feedback on Global Temporary Tables |
|
From: | | Hough, David A |
| 5. From what I've read it looks as though you can collect stats on them, but I haven't had any success doing that. I get an error message
5343 saying I can't collect stats on a materialized global temp table, but stats collected on an empty table are useless at best and misleading to
the optimizer at worst. | |
COLLECT STATISTICS ON ... applies to the base table definition.
COLLECT STATISTICS ON TEMPORARY ... applies to the materialized copy.
The manual says that the reason for the stats on the base table definition is so you can do a COLLECT STATISTICS ON TEMPORARY
<tname>; and get all the stats you need in one collect statement. There are other rules in the docs to cover end cases.
I do not know if any empty base table stats are carried to each materialization...
/dave hough
| |