GLobal Temporary Table (GTT)


GLobal Temporary Table (GTT)

Can 2 sessions create same name GTT? OR does it tack on sessionID# to the table name when it stores its DDL in DD (DBC.* tables)? If same table DDL can be viewed in different sessions but data is private to the session, then 2 sessions can not create same name GTT. When 2 or more sessions use same GTT name and add data, they maintain their own copy. However, at that point, internally Terdata has to store them with different name for different sessions to keep it independent.

Is that correct?


Teradata Employee

Re: GLobal Temporary Table (GTT)

Each session can materialize its own local instance of a GTT. Those instances have different internal Table IDs in the file system, even though they are accessed using the same name in SQL.