2

I have a MQT which refreshes a 120 million row table. How can I avoid running into transaction log space issus in DB2 when refreshing MQTs? What are the different techniques available in Db2?

1
  • 1
    This really belongs on dba.stackexchange.com Oct 25, 2013 at 17:59

1 Answer 1

2

I would build the table as NOT LOGGED INITIALLY. This will allow you to perform anything against the table and it will not log it until you issue a COMMIT statement. Then before you REFRESH the table again, make sure you ALTER the table to put it back into a NOT LOGGED INITIALLY state.

See information center for CREATE TABLE statement and look at the NOT LOGGED INITIALLY clause.

2
  • NOT LOGGED INITIALLY is not helpful as the APP USER ID in our project doesnt have privileges to perform any ALTER TABLE statements
    – Senthil
    Dec 4, 2013 at 18:49
  • You could have a script with the appropriate authorities do the ALTER and the REFRESH. Dec 4, 2013 at 21:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.