> Is this intended behaviour? How does the pragma/async io module fit in,
> then?

I believe you've got something wrong in your tests. Because with
asynchronous module (if you indeed used its VFS when created your
connections) no actual disk I/O happens in the same thread as insert
command. With PRAGMA synchronous = off the only syncs I can think of
being called is sync on directory where journal is created and
deleted. If you don't care about database corruption and if you don't
need to do rollbacks then maybe you need to try PRAGMA journal_mode =
off too? Or at least PRAGMA journal_mode = persist if you still need
to do rollbacks.


Pavel

On Tue, Aug 31, 2010 at 1:39 PM, Benjamin King <[email protected]> wrote:
> Hello,
>
> I'm using sqlite in a speed critical application. Data integrity after
> crashes is not very important as the database can be recreated from
> scratch in that case.
>
> In my tests, the writing of data with insert commands seemed very slow,
> despite being wrapped in a transaction.
>
> I have tried PRAGMA synchronous=off and also compiled the asynchronous
> io module in, but that didn't help much. A little profiling revealed
> that the unixSync function is called somewhere down the callstack of the
> insert command. And there, full_fsync seems not to take the pragma
> settings or the async io module into account.
>
> I recompiled sqlite with the SQLITE_NO_SYNC definement and had a huge
> increase in speed.
>
> Is this intended behaviour? How does the pragma/async io module fit in,
> then?
>
> Cheers,
>   Benjamin
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to