Link to home
Start Free TrialLog in
Avatar of mersis
mersis

asked on

How can one minimize logging performed by the DB2?

What DB2 settings do I need to say to literally minimize to its minimum possible level the logging functionality? In other words how can I minimize logging in DB2 if not completely turn it off? What switches are responsible and what are the right values for those?
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

hi
there are a couple of things you can do
1) you can turn off the logging mechanism for a table if you use the statement
alter table not logged initiallit (or adding that clause in the create table statement)
that puts the table in a no logging mode until you commit, so you can completly cancel logging this way but be aware of the reprecautions.
2) make sure none of the tables have data capture turned on (unless you replicate them)
3) on some platforms, column placement within the table influence the amount of log data written. it is advise to put all the columns that you might update in the end of the table (that is, last in the column sequence in the create table command)

you can also set the no log flags on large maintenance processes such as load and reorg
Avatar of mersis
mersis

ASKER

Thanks momi_sabag,
what are the actual statements to say NO LOGGING when creating a table and NO DATA CAPTURE? Or where do I check the NO DATA CAPTURE parameter, what is its actual name?
ASKER CERTIFIED SOLUTION
Avatar of momi_sabag
momi_sabag
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mersis

ASKER

thanks momi_sabaq, will try it out!
I suspect your question is related to a performance issue, in that you think the logging is impacting performance too much. If this is the case, then a more detailed response is necessary, or is your question simply I want to turn logging off because I dont think I need it?
Avatar of mersis

ASKER

ghp7000, you got me exactly right! All I am after is improving performance, which is pretty low at the moment. I have tried the by momi_sabaq suggested keywords but it had 0 impact on performance. Would hugely appreciate if you could advice me on that. (whatever I do, I would still like to be able to call rollback and commit if necessary).
what seems to be the most resource consuming process in your system ?
pleasee provide input about the processes whos performance you need to improve
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Note that depending on what platform is involved (1) logging might be _required_ in order for COMMIT/ROLLBACK even to be possible and (2) such logging might _increase_ performance.

Tom
you cannot turn logging off in db2, it is required for crash recovery
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for the clarification, as you can see, I have no experience working with AS400, but I sure wouldnt mind getting some!