Db transactions and locking
rosuav at gmail.com
Thu Nov 27 23:36:53 CET 2014
On Fri, Nov 28, 2014 at 5:02 AM, Ian Kelly <ian.g.kelly at gmail.com> wrote:
> On Nov 27, 2014 4:26 AM, "Frank Millman" <frank at chagford.com> wrote:
>> All Python database adaptors that I have used start a transaction when you
>> open a cursor. I have just re-read DB-API 2.0, and I cannot see anything
>> that specifies this behaviour, but AFAICT this is what happens.
> I don't know how others work, but cx_Oracle starts a transaction when you
> execute a statement, not when you open a cursor.
Is there any material difference here? I mean, sure, you have a
transaction, it'll show up in logs and stuff, but without any locks,
it's unlikely to have much impact on the system. Unless you're
creating and destroying a bunch of unnecessary cursors all the time,
of course, but that'd be wasteful for other reasons.
More information about the Python-list