Hi Roger,

Thanks for the explanation.

Collin

On 3/3/10 11:11 PM, Roger Binns wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Collin Capano wrote:
>    
>> Why does it prefer to use
>> /var/tmp or some other temp directory as opposed to just using the
>> current directory? Is there some performance advantage in doing this?
>>      
> The temp tables are for a particular connection only.  If the process dies
> unexpectedly then no other process would ever look for the temp tables.
> Consequently the temp files backing the temp tables really are temporary
> files and the OS appropriate locations are used by default.  (For example
> the OS may remove temp files not touched in the last 7 days.)
>
> By contrast the journal is looked for by other processes.  If a process is
> writing to the journal and dies unexpectedly then another SQLite based
> process will look for the journal and do a rollback as appropriate.
>
> As you saw you can control the temporary location at compile and run time,
> and also chance the behaviour between using files and using memory.
>
> ie SQLite has sensible defaults but you can still make things work however
> you want.
>
> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkuPMukACgkQmOOfHg372QTTVgCgt5Cp3uk+mY/DaTgX+CycOwa2
> bt4An31hdkCLYeQG1b8Tp8L3Z8AK4/vQ
> =zBma
> -----END PGP SIGNATURE-----
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>    

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to