Interview Questions   Tutorials   Discussions   Programs   

Teradata - In which scenarios we use Volatile tables and Global temporary Tables in Real time? Please give me one real time scenario? I know what is its use?




1113
views
asked mar September 20, 2014 06:38 AM  

In which scenarios we use Volatile tables and Global temporary Tables in Real time? Please give me one real time scenario? I know what is its use?


           

1 Answers



 
answered By vishnoiprem   0  
A volatile table is dropped at the end of the session(both definition and data). It is stored in spool space and
statistics for the data cannot be collected. A global temporary table's data alone is dropped at the end of the
session. It is stored in temp space and stats can be collected. Any user can make use of the definition within his temp space.

Sometimes, we may need aggregated data using some no of columns from a very big table and these results are needed in multiple sql requests In those cases, temporary tables
come in to picture and hold these temporary results for further processing. When you need the table to be used across sessions, GTT would be used so that definition would
be retained and can be reused by multiple users. When there is a need only within the session, volatile table would be used. These tables also help in speedy running of sqls.
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert