cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Is there any way to exclude a specific table from the transaction log?

The table in question is frequently being deleted/inserted with a massive amount of data. Every time this occurs,the log grows by about 5GB.

Thanks for your inputs!

View Entire Topic

Has anyone tried using a GLOBAL TEMPORARY TABLE with NOT TRANSACTIONAL clause for this?

From the description in the docs I'd expect it to do something very similar...

timcheshire
Explorer

Yup. I use GLOBAL TEMPORARY TABLE with NOT TRANSACTIONAL a lot. You can also use DELACRE LOCAL TEMPORARY TABLE in stored procedures with NOT TRANSACTIONAL.
I use these a lot to manipulate data without hitting the transaction log. You can create indexes on them too which improves performance on joins.

justin_willey
Participant

Yes, me too. Very useful with large temporary data sets where recovery is unimportant.

VolkerBarth
Contributor

...with the SHARE BY ALL clause, if it is menat to replace a base table, probably 🙂

FWIW, for ETL needs, we do use LOAD TABLE into local temporary tables with NOT TRANSACTIONAL very often, then usually comparing the "freshly imported data" in these temporary tables with that of according permanent tables, then merging only the changes into the latter ones, thereby reducing both the amount of data modifications and of log growth.

timcheshire
Explorer

Exactly what we do.