Allow "group commit" as other RDBMS
For high use OLTP systems, there can be a lot of I/O pressure on the logical log due to intense rate of logical log buffer flushing (most customer don't ant data loss so they use UNBUFFERED LOG).
Setting BUFFERED LOG at session level would hardly avoid this (on a system with many sessions at least) due to the high probability of lot's of almost simultaneous COMMITS. And it would mean potential "data loss"
Other RDBMS (DB2, Oracle, MySQL) have "solved" this by delaying the write until:
1- A certain number of COMMITS happens or
2- A certain amount of type has elapsed
The application can be forced to wait until the COMMIT is effectively flushed to disk to avoid the potential of data loss.
Currently in BUFFERED LOG we can delay the write, but because the application immediately receives the COMMIT feedback we cannot guarantee zero "data loss".
Currently in most customers with high rate of transactions we can see that we write on average just one page per logical log flush, meaning we're wasting the potential of performance improvement that the log buffer is supposed to give us. As such we have a potential bottleneck.
I suppose this would imply something like:
- new syntax for BUFERED LOG [MAXWAIT n]
where n would be number of ms with a minimum and maximum interval and possibly accepting only X increments
- new syntax for CREATE DATABASE ... WITH LOG [MAXWAIT n]
- Have some sort of list of "pending commits"
- Have a thread or mechanism that checks at X ms interval for sessions waiting on pending COMMITS and if this happens force the flush