When you use commit commit (either using the API or using COMMIT RETAIN ) with Firebird, the initial transaction does not actually end, it is simply associated with a set of visible transactions from a new transaction that was launched within the organization, while maintaining old active.
This means that the oldest interesting and oldest Active transactions are not moved, and backups are accumulated that cannot be garbage collected until the transaction is actually completed. This means that ultimately, queries will need to crawl a longer chain of record versions that may have an impact on performance.
I suppose that some optimizations are possible, for example, the initial transaction can be marked as committed if there are no open cursors that were launched in the transaction (one of the features of commit commit is that cursors do not close to transaction commit, which, if I I'm not mistaken, it requires that the old transaction context remain available). This may be something that InterBase did for read transactions.
You can see this for yourself by starting an isql session and making a few inserts in conjunction with a commit commit: if you check gstat -h in combination, you will notice that the oldest interesting and oldest active transactions are not moving until you really commit.
source share