I simply produced a brand new SQLite database in the command line and I've got a ODBC link with the SQLite database.
Basically problem it queries, automatically, the synchronous appears to become "ON" that is really slowing down lower Place performance large-time.

How do you obtain a SQLite database to default to PRAGMA synchronous = OFF without requiring to transmit a SQL command for this to do this? Can one produce a .INI file or something like that make it possible for it?

Regrettably for everybody, after letting this take 6 days, I finally determined the solution. The SQLite ODBC driver appears to become the solution. Should you produce a DSN, it enables you to definitely set Sync to "OFF" within the DSN configurations. Very convenient.

SQLite operates on FULL synchronous automatically. There's no INI, absolutely nothing to change except when connected. However, this only need be set once per session, which means you could improve your project's connection function to include the "PRAGMA synchronous = OFF" command following the connection. That might be really the cleanest and fastest approach.

But when you undoubtedly want SQLite to spread out your database with synchronization off automatically, you might like to recompile SQLite having a different default.

For that current release (3.7.3), search for variable safety_level in sqlite.c from the sqlite-amalgamation source:


safety_level = 3;


safety_level = 1;

(Yes, it's one-time in the spend setting.) Within the openDatabase function (and attachFunc if you want).

If you actually need this method faster, as mentioned within the comments you'll have at the minimum to think about transactions. In the future, this is actually the preferred solution. May possibly not function as the simplest, or even the most possible (time is in the end restricted to all), but it is the cleanest, sanest, simplest to keep in the long run. (I simply needed to have that off my chest. Done!)