From: Christopher Petrilli <petrilli@gmail.com>
To: PFC <lists@boutiquenumerique.com>
Cc: Simon Riggs <simon@2ndquadrant.com>
Cc: jd@commandprompt.com, Tom Lane <tgl@sss.pgh.pa.us>
Cc: Marc G. Fournier <scrappy@postgresql.org>
Cc: pgsql-performance@postgresql.org
Subject: Re: Sustained inserts per sec ... ?
Date: Mon, 4 Apr 2005 16:56:26 -0400
Message-ID: <59d991c4050404135650abda4f@mail.gmail.com> (raw)
In-Reply-To: <op.sop6y7v8th1vuj@localhost>
References: <20050401140421.P18194@ganymede.hub.org>
<1112644015.16721.790.camel@localhost.localdomain>
<59d991c40504040648457808e9@mail.gmail.com>
<59d991c4050401125956d6069d@mail.gmail.com>
<1112388818.3487.34.camel@jd2.commandprompt.com>
<59d991c4050401124638c4ab5d@mail.gmail.com>
<28353.1112388128@sss.pgh.pa.us>
<59d991c4050401113857086517@mail.gmail.com>
<59d991c405040413184699cfe1@mail.gmail.com>
<op.sop6y7v8th1vuj@localhost>
On Apr 4, 2005 4:53 PM, PFC <lists@boutiquenumerique.com> wrote:
> > This is done using COPY syntax, not INSERT syntax. So I suppose "yes"
> > I do. The file that is being used for COPY is kept on a ramdisk.
>
> COPY or psql \copy ?
> If you wanna be sure you commit after each COPY, launch a psql in a shell
> and check if the inserted rows are visible (watching SELECT count(*) grow
> will do)
The script is Python, using pyexpect (a'la expect) and does this, exactly:
psql = pexpect.spawn('/usr/local/pgsql/bin/psql -d bench2 ')
[ ...]
start = time.time()
psql.expect_exact('bench2=#')
psql.sendline("COPY events%03i FROM '/mnt/tmpfs/loadfile';" % (tablenum+1))
results.write('%s\n' % (time.time() - start))
results.flush()
There's other code, but it's all related to building the loadfile.
Note that I'm specifically including the time it takes to get the
prompt back in the timing (but it does slip 1 loop, which isn't
relevent).
Chris
--
| Christopher Petrilli
| petrilli@gmail.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: petrilli@gmail.com, lists@boutiquenumerique.com, simon@2ndquadrant.com, tgl@sss.pgh.pa.us, scrappy@postgresql.org
Subject: Re: Sustained inserts per sec ... ?
In-Reply-To: <59d991c4050404135650abda4f@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox