Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id C10E2B5DBD5 for ; Mon, 27 Jun 2011 03:36:05 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 98348-03 for ; Mon, 27 Jun 2011 06:35:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.214.174]) by mail.postgresql.org (Postfix) with ESMTP id 7ECC8B5D80A for ; Mon, 27 Jun 2011 03:35:59 -0300 (ADT) Received: by iwn6 with SMTP id 6so3856955iwn.19 for ; Sun, 26 Jun 2011 23:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=glyCgFIYhcQIFFtlxO9Vw00mYuxwLM13JZb76acBjfs=; b=uuVfNUcqvUU1+66NFT8i8u7vwvJ5EQ/tnkC8GMS+X/XeUSRDUKOrO91jZ82IyO3vJG 5Wnj5ero/RykQTa3ZC9jpJXpXaZWOzFzq4IDGcB8J2pIDRo+2Rq88RSgDqR5VqioQ35h 6CEiPTbGQILK9oiuMYvoPzSZIlEQ0Lf7kJ5j4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=wvjbWMS3KtJiN877RUqZumr06DyOdXyTmb6k4KirQJkx7Xl1NE1Ix6txlgTqFcJgCG WXFfdtnBHK98kNoAT5k+i6Dd+tMuOa7h6qrngaDT1A+rM69GUpF+6bhslKSB0KFjIWy8 cb5XlfETHTPx7Qd5xsZ/T2+jWrWPF78G6Zg/s= Received: by 10.42.132.70 with SMTP id c6mr7208728ict.349.1309156559102; Sun, 26 Jun 2011 23:35:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.4.16 with HTTP; Sun, 26 Jun 2011 23:35:19 -0700 (PDT) In-Reply-To: <333801.29762.qm@web161424.mail.bf1.yahoo.com> References: <333801.29762.qm@web161424.mail.bf1.yahoo.com> From: Pavel Stehule Date: Mon, 27 Jun 2011 08:35:19 +0200 Message-ID: Subject: Re: best performance for simple dml To: chester c young Cc: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=90e6ba5bbc77a9221c04a6abc3d7 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201106/93 X-Sequence-Number: 35559 --90e6ba5bbc77a9221c04a6abc3d7 Content-Type: text/plain; charset=UTF-8 Hello try it and you will see. Depends on network speed, hw speed. But the most fast is using a COPY API http://www.postgresql.org/docs/9.0/interactive/libpq-copy.html Regards Pavel Stehule 2011/6/27 chester c young > what is the best performance / best practices for frequently-used simple > dml, for example, an insert > > 1. fast-interface > > 2. prepared statement calling "insert ..." with binary parameters > > 3. prepared statement calling "myfunc(..." with binary parameters; myfunc > takes its arguments and performs an insert using them > > --90e6ba5bbc77a9221c04a6abc3d7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello

try it and you will see. Depends on network speed, hw speed. B= ut the most fast is using a COPY API

http://www.postgresql.org/docs/= 9.0/interactive/libpq-copy.html

Regards

Pavel Stehule


2011= /6/27 chester c young <chestercyoung@yahoo.com>
what is the best performance / best pract= ices for frequently-used simple dml, for example, an insert

<= div>1. fast-interface

2. prepared statement calling "insert ..." wi= th binary parameters

3. prepared statement calling= "myfunc(..." with binary parameters; myfunc takes its arguments = and performs an insert using them


--90e6ba5bbc77a9221c04a6abc3d7--