If we see a GTT table definition,there is a LOG.Can anyone please tell me.

General
Enthusiast

If we see a GTT table definition,there is a LOG.Can anyone please tell me.

Hi,

Could anyone please tell what is the use of LOG option in GTT and VTT temporary table if we see table definition.

Please share me the reason why temporary tables uses LOG option in DDL.

Thanks in advance.
Regards,
Purushotham.
1 REPLY
Supporter

Re: If we see a GTT table definition,there is a LOG.Can anyone please tell me.

From the documentation:

whether transient journaling occurs for a global temporary or volatile table or not. This option pertains to global temporary and volatile tables only.

LOG specifies that any updates, inserts, or deletes made to the global temporary or volatile table be logged in the transient journal. This is the default.

NO LOG specifies that transient journal logging is not to be performed. Because the Teradata Database does not do any transient journaling, performance is greatly enhanced.

If any sort of abort or restart occurs and the table is defined as NO LOG, then any updates, inserts, or deletes made to the global temporary or volatile table cannot be recovered.

If the table is defined as NO LOG, contents of any materialized global temporary table or any volatile table are emptied when a transaction aborts.