Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81650

Re: Db transactions and locking

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.021
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'happens.': 0.09; 'here?': 0.09; 'sure,': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'mean,': 0.16; 're-read': 0.16; 'stuff,': 0.16; 'unlikely': 0.16; 'wrote:': 0.18; 'starts': 0.20; 'work,': 0.20; 'cc:addr:python.org': 0.22; 'creating': 0.23; 'specifies': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'bunch': 0.31; 'open': 0.33; 'fri,': 0.33; 'transaction': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'material': 0.36; 'nov': 0.38; 'anything': 0.39; 'system.': 0.39; 'how': 0.40; 'ian': 0.60; 'logs': 0.60; 'impact': 0.61; "you're": 0.61; 'show': 0.63; 'statement,': 0.68; '4:26': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=xtKi3e7asGUHmRI3BnOttM24HoEIG2P/iWW/oWKe7wQ=; b=HfQnpODx1QlqmSPb/TwZJfGO1JMxBrXKRjRcGm/DxALVqB12q4uE6T86SloGH0CXS5 1bAC0Z56td3lMm7DHDR6E5dFk58MtplluHER+qLFkNtZbxpql5YAbx34uUSeKFV+Qa4A deATw/5MnIAPaYujQeeN6zH+PxRTfyeirYuJO1kzipkbkxQSzel/onWUt1iiL3Flx6s2 HObY4xJfGaIYDWriJR1kg00We5KfL7LJX5IDQkNC1UrxyGGKLFVxRa9jPLbz0jDZUUIK y4HnXcJo2Ypf9+FCBrsTS1i0aNJshp7wTZgK9zI+uL1Yph/OYABUHBbWp4iXjEvLazVL I8nA==
MIME-Version 1.0
X-Received by 10.107.134.39 with SMTP id i39mr36080380iod.53.1417127813928; Thu, 27 Nov 2014 14:36:53 -0800 (PST)
In-Reply-To <CALwzidkJrZTce0fuZBGsLwCyRbz43bBfqBhXKwDSQeout+bXZw@mail.gmail.com>
References <m56u4s$baa$1@ger.gmane.org> <CALwzidkJrZTce0fuZBGsLwCyRbz43bBfqBhXKwDSQeout+bXZw@mail.gmail.com>
Date Fri, 28 Nov 2014 09:36:53 +1100
Subject Re: Db transactions and locking
From Chris Angelico <rosuav@gmail.com>
Cc Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.16381.1417127816.18130.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1417127816 news.xs4all.nl 2850 [2001:888:2000:d::a6]:46065
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:81650

Show key headers only | View raw


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.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Db transactions and locking Chris Angelico <rosuav@gmail.com> - 2014-11-28 09:36 +1100

csiph-web