Sqlite pragma statement "locking_mode" set to "EXCLUSIVE" by default
ryan.stuart.85 at gmail.com
Tue Sep 22 14:04:29 CEST 2015
On Tue, Sep 22, 2015 at 5:12 PM, Sol T <sol433tt at gmail.com> wrote:
> I know I can do this per connection, however how can I have it set to
> default? Does this need to be compiled into python?
If you need to compile sqlite you might want to look at apsw:
> On Tue, Sep 22, 2015 at 2:04 PM, Ryan Stuart <ryan.stuart.85 at gmail.com>
>> On Thu, Sep 17, 2015 at 2:24 PM, sol433tt <sol433tt at gmail.com> wrote:
>>> I would like to have the Sqlite pragma statement "locking_mode" set to
>>> "EXCLUSIVE" by default (RO database). Does this need to be compiled in? How
>>> might this be achieved?
>> You can issue any PRAGA statement you like using the execute method on a
>> connection as per the documentation (
>> For information on the specific PRAGMA option you need, see
>> https://www.sqlite.org/pragma.html#pragma_locking_mode. I can't see any
>> mention of it being a compile time PRAGMA.
>>> There is some performance to be gained. I have a number of python
>>> scripts, and don't want to alter the pragma statement for every script.
>>> This computer never writes to the databases.
>>> thank you
>> Ryan Stuart, B.Eng
>> Software Engineer
>> W: http://www.kapiche.com/
>> M: +61-431-299-036
Ryan Stuart, B.Eng
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list