Re: Logical log write volumes
Posted in 1995
[Re: how much logical log space is used by an INSERT-intensive program] >If the minimum unit of work is a page, won't it be one page per insert >with unbuffered? And if you do ten inserts to the same page, won't that >mean only one *disk* i/o with buffered (as long as all ten inserts are >between buffer flushes)? If each INSERT statement is a single transaction, then yes, it will be about one page per insert (with unbuffered logging). (When it will not be one page per insert is if you manage to get any "piggyback" commits, but if it's just one program doing all the work, I don't think you'll get that.) Log buffer flushes are (generally) triggered by the buffer being full, so if the one program is all that's running, then you will get as many INSERTs as fit on a page. If you can fit 10 INSERTs (given the rowsize and indexes) onto a single log page, that means one disk I/O for 10 inserts using buffered logging, as compared to one disk I/O for 1 insert with unbuffered. But beyond that, if your log buffer is 16 pages, then with buffered logging you will write 16 pages at a time as compared to a write per page with unbuffered. In this (somewhat extreme) example, you'd be doing 160 writes of 1 page each with unbuffered, and 1 with buffered. (I'm not sure it's actually sending ALL 16 pages with a single write call, but you get the idea...) June ---- June Tong Informix Software ---- ---- junet@informix.com (415)926-6140 ----