Skip site navigation (1) Skip section navigation (2)

Re: Performance

From: Webb Sprague <wsprague100(at)yahoo(dot)com>
To: Ron Chmara <ron(at)Opus1(dot)COM>, Thomas Weholt <Thomas(at)cintra(dot)no>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Performance
Date: 2000-06-02 16:51:39
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I was working with \copy recently, and one of the
problems with it is that it won't make the defaults
happen, including serial for primary key (I think).  I
wrote an "awk" script that takes a '|' delimited file
with the name of the table fields in the top row & the
data to insert in the other rows, and turns it into a
series of INSERTS.  If you want it, email me (I am on
the DOS part of a dual boot machine, so I can't get it
right now).

--- Ron Chmara <ron(at)Opus1(dot)COM> wrote:
> Thomas Weholt wrote:
> > 
> > Hi,
> > I just got my Postgres-database up and running,
> putting in data using a
> > Python-script, using the latest version of the
> PyGres-module by
> > Darcy(at)druid(dot)net(dot) It works great!
> Python is pretty. But it can suffer from poor
> scripting, from excessive
> overhead (quite common in OO).
> > But insertion seems slow, even though I
> > just got a few indexes.
> How slow is it? 
> > How can I turn off the fsync-variable? There must
> be
> > a way to turn it off when starting the database,
> like postmaster -x where x
> > is some command-line option or a setting in a
> config-file etc.
> -F
> > I haven`t
> > found anything in my search so far. What will this
> do in terms of
> > performance ( 1-5 times ??? ) 
> See:
> > and is it considered safe? ( I`m running Linux)
> as long as you don't crash or lose power. :-)
> > How does PostgreSQL compare in terms of speed
> compared to other databases,
> > commercial products included??
> It's slower than MySQL on simple tables, but that's
> because you can do
> much more complex tables.
> > I need to insert about 2000-10000 records into a
> database. I`m using Python
> > to do this. Is there a way to use some form of
> bulk copy that will do this
> > faster than plain-old insert for each and every
> record?
> On an extremely fast system, with Fsync off, this
> should take less than
> 30 seconds. On slower systems, or with fsync on,
> your performance will
> degrade greatly. I've seen 468 machines running at 2
> inserts a second...
> Aside from that backend speed, you might try
> converting the text data
> you have into SQL _first_, and then feeding that in
> as a file. If you
> are reading a line, parsing, inserting, reading the
> next line, parsing,
> inserting... well, you get the picture. That loop
> will cost you.
> -Ronabop
> -- 
> Brought to you from iBop the iMac, a MacOS, Win95,
> Win98, LinuxPPC machine,
> which is currently in LinuxPPC land.  Your bopping
> may vary. Do not eat
> contents. Cape does not enable wearer to fly. Use
> only as directed.

Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!

pgsql-novice by date

Next:From: alDate: 2000-06-02 20:16:24
Subject: Re: [NOVICE] [OT] How to avoid using Reply-All on this list
Previous:From: Anthony E. GreeneDate: 2000-06-02 15:11:24
Subject: Re: [NOVICE] [OT] How to avoid using Reply-All on this list

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group