SqlCE Flush Interval - Will the default cause damage?

SqlCE has a set of parameters in the Connect string called Flush Interval. It is defined as:

The time interval (in seconds) before all completed transactions are flushed to disk. If not specified, the default value is 10.

I thought that a perfect transaction, by definition, is a transaction that has been flushed to disk, in particular a database file. If the transaction is stored only in RAM, then the transaction cannot be easily lost?

I thought that the transactions were first written to the log file and then applied to the database file itself, so maybe this parameter can mean the wait time until the transaction log is applied to the database file?

I would think this parameter should be 0.

UPDATE -------

Let me include my internal database. As I understand it, when an application starts a transaction, a record of the start of a transaction is written to the LOG LOG, then every added, changed or deleted record is written to the LOG, and then to the record of the completion of the transaction. A separate thread detected the end of the transaction and moved records from the LOG to the database. When this was completed, the transaction ID was increased to indicate that the transaction was completed. If the process crashed anywhere when the database started, it would check the LOG to find out the state of the database and complete or cancel open transactions. All this means that the work is written to disk at all stages of the process.

Flush Interval LOG DATABASE, , , LOG, ACID.

+3
2

Commit . Commit CommitMode.Immediate, Flush-Interval , . CommitMode.Deferred ( ), Flush-Interval.

SQLCE: SQL Server Compact Edition

+1

. .

. 1 .

0

Source: https://habr.com/ru/post/1749641/


All Articles