>
>> Basically I want to do many inserts and reads
>> using the database and I want to keep ACI of ACID
>> part. I mean I don't care that some of the transactions
>> are get lost, but I do care that the database state
>> would remain consistent in case of catastrophic fault.
>
>perhaps various combinations of 

> PRAGMA journal_mode OFF,

Would make DB non-transactional


> PRAGMA synchronous OFF,

Would make it not only non-Durable but it may be corrupted
in case of for example power failure.


> PRAGMA temp_store MEMORY, etc will get you what you want, no?

Would not really help me as I don't need temporary tables.


>
>


What I'm thinking about is actually following:

    PRAGMA journal_mode = wal;   

    PRAGMA synchronous = NORMAL;
    PRAGMA wal_autocheckpoint = 0;

Now once in a while (for example once in a second)
I can execute

    PRAGMA wal_checkpoint;

Seems would make the DB ACI(D) where D is promised only
after I call

    PRAGMA wal_checkpoint;


This is quote from Sqlite PRAGMA synchronous documentation

> In WAL mode when synchronous is NORMAL (1),
> the WAL file is synchronized before each
> checkpoint and the database file is synchronized
> after each completed checkpoint, but no other
> sync operations occur. With synchronous=FULL
> in WAL mode, an additional sync operation of
> the WAL file happens after each transaction
> commit. If durability is not a concern, then
> synchronous=NORMAL is normally all one needs
> in WAL mode.

So it seems that what I've mentioned seems to
be correct according to this.

Can somebody confirm this behavior?

Artyom
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to