Hi,
you CAN specify TEMP SPACE limits on the create/modify User/database like you can from PERM and SPOOL although it migh not be as common an option.
However the limit hs nothing to do with the speed of the query. The query runs at full speed and when you hit the limit it aborts.
I found this in the SQL manual. There is an Option on the CREATE/ALTER table which could affect performance.
LOG / NO LOG
the transaction journaling option for a global temporary table.
LOG specifies that any updates, inserts, or deletes made to the global temporary or volatile table be logged in the transaction journal. This is the default.
NO LOG specifies that transaction journal logging is not to be performed. Because the system does not do any transaction journaling, performance is greatly enhanced.
If any sort of abort or restart occurs and the table is defined as NO LOG, then any updates, inserts, or deletes made to the temporary or volatile table cannot be
recovered.
If the table is defined as NO LOG, contents of any materialized temporary table or any volatile table are emptied when a transaction aborts.
This option pertains to global temporary and volatile tables only.
Pleease Note LOG is the default if you don't specify NO LOG explicitly.
I wonder if there is a BUG in the LOG logic that will TJ the inserts even if the table is empty.
Maybe somehow the commit logic of your script got changed when you converted it from using PERM tables to using Global Temp tables.
Some how after the first row is inserted it is committed and therefore subsequent rows are inserted into a populated table ( instead of an empty table ) and therefore they are being journaled.
But this last statement would be true in either case, because PERM tables would be journaled as well, if you didn't change the commit structure of your script.
----