While browsing the SQLite docs, to see how to find out what indices are
on a table ( the answer is '.schema <tablename>' ), I came across this.

Kern, perhaps this is why SQLite 3.0 seems so slow for you?

PRAGMA synchronous;
PRAGMA synchronous = FULL; (2)
PRAGMA synchronous = NORMAL; (1)
PRAGMA synchronous = OFF; (0)

Query or change the setting of the "synchronous" flag. The first (query)
form will return the setting as an integer. When synchronous is FULL
(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. FULL synchronous is very safe, but it is also slow. When
synchronous is NORMAL, the SQLite database engine will still pause at
the most critical moments, but less often than in FULL mode. There is a
very small (though non-zero) chance that a power failure at just the
wrong time could corrupt the database in NORMAL mode. But in practice,
you are more likely to suffer a catastrophic disk failure or some other
unrecoverable hardware fault. With synchronous OFF (0), SQLite continues
without pausing as soon as it has handed data off to the operating
system. If the application running SQLite 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 with synchronous OFF.

In SQLite version 2, the default value is NORMAL. For version 3, the
default was changed to FULL.

-- 
Russell Howe
[EMAIL PROTECTED]


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to