Append hint, Truncate, Global Temp Table [message #215802] |
Tue, 23 January 2007 23:52 |
a_developer
Messages: 194 Registered: January 2006
|
Senior Member |
|
|
Is it necessary to truncate the Global temp table, then use Append hint when inserting to it? Let's say it's populated for the first time. I mean do truncate and append hint really help in initially populating a global temp table?? sounds redundant to me.. but i need your confirmation.. thanks in advance..
|
|
|
Re: Append hint, Truncate, Global Temp Table [message #215830 is a reply to message #215802] |
Wed, 24 January 2007 01:01 |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
Non-intuitively, the APPEND hint will make for faster inserts into a GTT. I was surprised, but I test it and APPEND is definitely faster because it does not write to REDO. I have no idea why GTT's would even need REDO.
If you suspect you may have used it once already in the session (or since the last commit for ON COMMIT DELETE ROWS) then you can TRUNCATE, it will be quick.
Ross Leishman
|
|
|
|