diff between volatile and GTT table with ON PRESERVE COMMIT statement

Teradata Applications

diff between volatile and GTT table with ON PRESERVE COMMIT statement

Hi,

I am a newbie in Teradata and trying to know the basic concepts. I was able to understand the basic difference between Volatile table and GTT

Volatile table - exists only during the session and table structure and row contents deletes after the session

GTT - the table contents exists only during the session and table structure retains unless dropped manually/ command (as table structure gets copied to DD).

but my question is, what would be the difference between both these tables if both are used with the ON COMMIT PRESERVE ROWS statement.

thanks in advance!

Tags (1)
1 REPLY

Re: diff between volatile and GTT table with ON PRESERVE COMMIT statement

They are similar in many features. You can create and see both how they are implemented. This link highlights a comparison:

http://www.info.teradata.com/HTMLPubs/DB_TTU_13_10/index.html#page/Database_Management/B035_1093_109...

There are scenarios where we need to use GTT , VTT to optimize the systems or applications.

In the context ON COMMIT PRESERVE ROWS, it is the same for both, saving contents.