agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Mike Olson <mao@illustra.com>
To: Kai Petzke <wpp@marie.physik.tu-berlin.de>
Cc: William T. Smith <smith_w@mcnc.org>
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: POSTGRES Append Performance
Date: Fri, 13 Jan 95 07:48:12 -0800
Message-ID: <9501131548.AA17413@boulevard.illustra.com> (raw)
wpp@marie.physik.tu-berlin.de (Kai Petzke) writes:
> > I am evaluating version 4.2 of POSTGRES as a database tool to
> > provide persistent storage of directed graphs. The test program adds
> > one node which requires 17 append operations against an empty database.
> > Each instance has less than 100 bytes. The program takes 10 seconds
> > elapsed time to execute. Adding ten nodes takes 20 seconds. Is this
> > "normal" performance for POSTGRES? Does anyone have any suggestions to
> > improve performance? Is anyone using POSTGRES to support interactive
> > applications.
>
> If you want better update performance for multiple tuples, use the
> "copy in" function. Here, the parsing is done only once for the
> complete set, not once for every datum.
more to the point, if you're representing a digraph as a set of rows,
you're not really using the full power of postgres. that's the way
to do it in oracle or sybase, since those system don't let you define
new types or operations on them.
in postgres, you can create a new data type, digraph_t, that manages
an arbitrarily large graph stored in a large object. you can write
recursive traversal functions on that data type to compute shortest
path, reachability, and anything else you want.
if you do this, you will get wildly better performance -- first, because
the representation of a graph is compact and can be optimized for
traversal, and second because the server can run recursive traversal
functions itself -- it doesn't need to ship graphs over the network
to the client for consideration.
mike
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
reply
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: postgres@postgres.berkeley.edu
Cc: mao@illustra.com, wpp@marie.physik.tu-berlin.de, smith_w@mcnc.org
Subject: Re: POSTGRES Append Performance
In-Reply-To: <9501131548.AA17413@boulevard.illustra.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox