Total Pageviews

Tuesday 5 February 2013

What is the difference between Global temporary tables and Volatile temporary tables?

What is the difference between Global temporary tables and Volatile temporary tables?

Global Temporary tables (GTT):-
1. Whenever we create GTT, its definition is stored into Data Dictionary.
2. Whenever we insert data into GTT,data is stored into temp space. So definition of the table will be active until we can delete using the drop table statement and data remains active up to end of the session only
3. We can Collect statistics on Global temporary tables.

Volatile Temporary tables (VTT) :-

1. Whenever we create VTT, its Definition is stored into System cache.

2. Whenever we insert data into VTT, data is stored into spool space.So table definition and data both are remains active only up to session end only. 
3. We cannot able to collect statistics on volatile tables.
Note: From TD13 Onwards we can collect temporary Stats on VTT Tables.

No comments:

Post a Comment