配置数据库性能/稳健性

MediaMonkey 使用 SQLite 数据库来存储信息。SQLite 数据库默认配置为非常安全,即使在软件或硬件发生故障的情况下也是如此。但是,有些用户可能更愿意牺牲一点安全性来获得略微提高的性能。

对于此类用户,应将下面所示的行添加到MediaMonkey.ini文件的[System]部分:

[系统]
SQLiteSafety=x

x 的可能值为 0、1 或 2:
0 :最快-最不稳健,也称为同步 = OFF。
SQLite 在将数据交给操作系统后会继续运行而不会暂停。如果 MediaMonkey 崩溃,数据是安全的,但如果操作系统崩溃或计算机在数据写入磁盘表面之前断电,数据库可能会损坏。另一方面,在此设置下,某些操作的速度会提高 50 倍或更多。

1 :中等至非常稳健,也称为同步=正常。
SQLite 数据库引擎仍会在最关键的时刻暂停。在错误的时间发生电源故障可能会损坏数据库,这种可能性非常小(但并非为零)。但在实践中,您更有可能遭遇灾难性的磁盘故障或其他无法恢复的硬件故障。

2 :慢速-极其稳健(默认),也称为同步=FULL。
如果值为 2,SQLite 数据库引擎将在关键时刻暂停,以确保数据确实已写入磁盘表面后再继续。这可确保如果操作系统崩溃或发生电源故障,数据库在重新启动后不会损坏。此模式非常安全,但速度也很慢。

Applies to: ,

Translated automatically (see original)

Configure Database Performance / Robustness

MediaMonkey uses the SQLite database to store information. The SQLite database is by default configured to be very safe even in cases of software or hardware failure. However, some users might prefer to sacrifice a little safety and get slightly improved performance.

For such users, the line indicated below should be added to the [System] section of the MediaMonkey.ini file:

[System]
SQLiteSafety=x

Possible values for x are 0, 1 or 2:
0: Fastest-least robust, also known as synchronous = OFF.
SQLite continues without pausing as soon as it has handed data off to the operating system. If MediaMonkey crashes, the data will be safe, but the database might become corrupted if the operating system crashes or the computer loses power before that data has been written to the disk surface. On the other hand, some operations are as much as 50 or more times faster at this setting.

1: Medium-very robust, also known as synchronous=NORMAL.
The SQLite database engine will still pause at the most critical moments. There is a very small (though non-zero) chance that a power failure at just the wrong time could corrupt the database. But in practice, you are more likely to suffer a catastrophic disk failure or some other unrecoverable hardware fault.

2: Slow-extremely robust (default), also known as synchronous=FULL.
With a value of 2, the SQLite database engine will pause at critical moments to make sure that data has actually been written to the disk surface before continuing. This ensures that if the operating system crashes or if there is a power failure, the database will be uncorrupted after rebooting. This mode is very safe, but it is also slow.

Applies to: ,

Hide original

这篇文章有帮助吗?