In terms of performance, is there a difference between
global temporary tables and tables that have the NOLOGGING option? I know that data is stored differently in them, and that data goes away either after the transaction or session for global temp tables, but I don't care about that.
Only one session will be inserting data into these tables and then selecting it back out with some grouping. Then the tables will be truncated at the end of the session. I know that there are still some bugs with GTTs in the version of Oracle I am on, so I would like to avoid them if I can.
04-30-2001, 04:23 PM
Depends on how do you intend to insert your data in the NOLOGGING table. As it was already discussed in this forum, inserts into normal tables with NOLOGGING option are not logged only in some specific circumstances (basically it is only during SQL*Loader direct path, during create-table-as-select and during direct path inserts). Normal inserts are fully logged!
On the other hand, inserts into global temporary tables are realy not logged. Or to be more speciffic, the amount of redo informations written into redo logs is minimised (but not totaly avoided). There is an excelent article about the amount of redo generated for global temporary tables by Craig Shallahamer. Check it out on http://www.orapub.com//cgi//genesis....sub&p2=abs130.
I use global temporary tables a lot, especially to avoid excessive redo log generation during massive inserts/updates of temporary data, and they work just fine. I haven't encountered any bug with them yet.