Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'insert': 0.05; 'postgresql': 0.07; 'mysql.': 0.09; 'postgresql,': 0.09; 'subject:How': 0.10; 'books': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'statements,': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'separate': 0.22; 'certainly': 0.24; "i've": 0.25; 'extension': 0.26; 'least': 0.26; 'values': 0.27; 'header :In-Reply-To:1': 0.27; 'skip:( 40': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'checked': 0.32; 'table': 0.34; 'subject:with': 0.35; 'received:209.85': 0.35; 'common': 0.35; 'received:209.85.220': 0.35; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'done': 0.36; 'two': 0.37; 'received:209': 0.37; 'performance': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; '30,': 0.65; 'mar': 0.68; 'records.': 0.68; 'records': 0.73; '"one': 0.84; 'subject:find': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=OJ4eCgjTsr7WprOz0GWueDuYEU0c4/UM3QzJhC1Lsk0=; b=qCZuGa5jmzICPi0X3m+1jmGkMFpYRAUoq8LuSyXoxOEUwiso8E9WONdRgISfffdmR0 5Tmf9y8mBGqRaULbDYIOTklhuglg1DmfVXdoK+FQg5KNA2CNRO1wa4JyGfvbRNknt2ob BwOXDcruMHnhSMAnfPYdfZLuKjcG1XjJUXmgyQjx6OUranM6cCdUB/XFXpX4EtU+5Rju afEzx4PiZtkiS+YooyfCCH2WO1AV7WXNfLPYwcjnrSBGBRvzjYgjrhiRO4xdn6QQVGtA H6Upfol28HcPjyPWMGIxS2Br5PB0D/IuIIRIh00h39eejy43YXOf5DL1RYW0fgkxhKGX z8kw== MIME-Version: 1.0 X-Received: by 10.220.223.80 with SMTP id ij16mr3626636vcb.28.1364617492435; Fri, 29 Mar 2013 21:24:52 -0700 (PDT) In-Reply-To: <2mocl85ru7r58tluf05e47qicjecpht68c@invalid.netcom.com> References: <5155E32A.1000403@davea.name> <2mocl85ru7r58tluf05e47qicjecpht68c@invalid.netcom.com> Date: Sat, 30 Mar 2013 15:24:52 +1100 Subject: Re: How to find bad row with db api executemany()? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1364617501 news.xs4all.nl 6860 [2001:888:2000:d::a6]:60955 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42318 On Sat, Mar 30, 2013 at 3:19 PM, Dennis Lee Bieber wrote: > I think MySQL is the only common DBMS with an extension on INSERT of > allowing multiple records (I've not checked my Access 2010 docs, and my > MSDE/SQL-Server books are in storage -- but SQLite3, Firebird, and > PostgreSQL all seem to be "one INSERT = one record"). I don't know about performance, but syntactically at least, an INSERT is certainly allowed to do multiple records. I do this all the time for database dump/recreation, something like: INSERT INTO table (field,field,field) VALUES (value,value,value),(value,value,value); I've done this in PostgreSQL, and I'm pretty sure also in MySQL. That might be identical in performance to two separate statements, but at least it's clearer. ChrisA