On 11 Apr 2015, at 2:30pm, Peng Yu <pengyu.ut at gmail.com> wrote:

> I am wondering for my limited usage scenario, is it possible to make
> sqlite3 on NFS as fast as sqlite3 on local storage (such as disable
> file locking).

No.  Data will flow to a local disk much faster than it can flow across your 
network.  But you can make network access faster using the following:

Open the database READ_ONLY or use "PRAGMA query_only = YES".  This may 
increase speed a little.

Use the following:

PRAGMA journal_mode = OFF;
PRAGMA locking_mode = EXCLUSIVE;

Experiment with values for the following command:

PRAGMA cache_size = 10000;

The best values for this depend on complicated aspects of your hardware: the 
size of blocks on your disk, the size of packets on your network, the speed of 
the data bus in your computer, and other things.  The default is 2000.  You may 
find that bigger or smaller numbers make a difference.  Or you may find they 
make no difference.

Simon.

Reply via email to