Re: logical log/ locks tuning
Posted in 1995
ajay@ios.ho.att.com (-A.DANKAR) wrote: >To Informix Gurus: >We have to purge our log data periodically. The log resides in an >Informix table. The affected records could be quite big in number, >and we often run into problems either because the LOCKS limit was hit >or the logical log became full. Could you suggest what all parameters >to tune. We are thinking of reducing the number of records to be >removed per transaction. could you give some guidelines as to >how to decide this, given the other two variables. >Thanks, >-ajay > ____________________________________________________ > | Ajay Dankar AT&T Bell Laboratories | > | ajay@ios.ho.att.com Holmdel, NJ 07733 | > |____________________________________________________| Well it depends on how you are doing the pruge.. If you have written a esql/c or 4gl program you should have the purge code within a begin work and commit work loop.. You may want to commit on each row deleted or you may want to delete lets say 10 rows and then commit. If you are doing this in ISQL (I hope not) then the script should look something like this: begin work; lock table "tablename" in exclusive mode; your delete statement ie "Delete from tablename where ......." commit work; Locking the table will cause only one lock to be used maybe two depending indexs.. However log files will continue to be used. In this case you better know just how many rows you are about to delete and how many rows there are per page.... You do not want to run out of logs because bad things will happen to you and your database... Clyde H. Bryant E-mail bryant@anasazi.com Senior System Engineer Anasazi Inc. 7500 N. Dreamy Draw Drive Phoenix, Az. 85020 (602)395-1721 Office (602)861-7687 Fax