[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Transaction commit speed
Sam Dave wrote:
> Hi,
>
> Are transaction commits always fast (almost instantaneous) operations compared to the read or write operations within it? Is it possible for say an
> mdb_cursor_get or mdb_put to be faster than a subsequent mdb_txn_commit, and if so under what circumstances can that happen?
>
>
> This is relevant info for UI applications showing a progress indicator. If an mdb_txn_commit is always fast, we can rely on the _get/_put count to calculate the
> percentage.
Generally no, a txn_commit should take time proportional to the number of pages that
were dirtied in the transaction. And that number depends on the number of puts/dels
that were performed in the transaction.
gets don't dirty any pages, so they are irrelevant for commit speed.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/