Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81687
| References | <m56u4s$baa$1@ger.gmane.org> <CALwzidkJrZTce0fuZBGsLwCyRbz43bBfqBhXKwDSQeout+bXZw@mail.gmail.com> <CAPTjJmrGJ-UQi5J-1_p9kB+HVkXMRwSre1k33_4E2EqA8DPf4g@mail.gmail.com> |
|---|---|
| Date | 2014-11-28 08:44 -0700 |
| Subject | Re: Db transactions and locking |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16408.1417189469.18130.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
On Nov 27, 2014 4:39 PM, "Chris Angelico" <rosuav@gmail.com> wrote: > > On Fri, Nov 28, 2014 at 5:02 AM, Ian Kelly <ian.g.kelly@gmail.com> wrote: > > On Nov 27, 2014 4:26 AM, "Frank Millman" <frank@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. Sure. If you commit the transaction and then execute another statement, you'll get a new transaction.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Db transactions and locking Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-28 08:44 -0700
csiph-web