Re: Logical log write volumes
Posted in 1995
>Andy Kent writes:- >> Can anyone tell me how you work out how much gets written to the logical >> logs during an insert-intensive application? The calculation should be something like: 16 bytes + rowsize for each row inserted 16 bytes + indexsize for each row/for each index on the table (these numbers might be +/-4 in either direction) This is for an insert. Updates and deletes are different. Plus there will be another 12-16 bytes for each BEGIN WORK, COMMIT WORK, and around 24 bytes each time you have to add another extent to your table. But these will probably be much less significant. >>What are the differenc >> here between buffered and unbuffered logging? (I thought buffered d >> "piggyback" writes, but I was on a site recently where the logging >mode > didn't seem to make any difference to logging volumes) Logging mode WILL make a difference to the logging volumes, but how much of a difference will depend on your transactions. Unbuffered logging flushes the log buffer to disk everytime you commit a transaction. Only whole pages are written to disk. Therefore, there will be times when a page which is not full will be written to the log on disk. With buffered logging, most, if not all, of the pages will be full when they are written to disk. Whether this is noticeable or not will depend on the length of your transactions. If you have a transaction that takes up 20MB of log, and then commits and flushes a page which is only half-full, you probably won't notice any difference in the amount of logging. On the other hand, if your transactions are very short -- say, insert 2 short rows and commit -- you will be flushing partially used pages very often, and you will probably see that your logs fill up more quickly. Malcolm is right when he says that the logging volume will not change, if by that he means that no more information is written to the logs. But more empty space will be in the logs, and you will fill your logs faster. June ---- June Tong Informix Software ---- ---- junet@informix.com (415)926-6140 ----