Return-Path: owner-postman Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id HAA07348 for postgres-redist; Fri, 13 Jan 1995 07:46:08 -0800 Resent-From: POSTGRES mailing list Resent-Message-Id: <199501131546.HAA07348@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from angular.illustra.com (angular.illustra.com [192.207.88.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id HAA07338 for ; Fri, 13 Jan 1995 07:46:05 -0800 Received: from boulevard.illustra.com by angular.illustra.com (4.1/smail2.5/06-10-94/M) id AA10779; Fri, 13 Jan 95 07:45:28 PST Received: by boulevard.illustra.com (4.1/smail2.5/06-10-94/S) id AA17413; Fri, 13 Jan 95 07:48:21 PST Message-Id: <9501131548.AA17413@boulevard.illustra.com> To: wpp@marie.physik.tu-berlin.de (Kai Petzke) Cc: smith_w@mcnc.org (William T. Smith), postgres@postgres.Berkeley.EDU Subject: Re: POSTGRES Append Performance In-Reply-To: wpp's message of 13 Jan 95 1:42 +0100 Date: Fri, 13 Jan 95 07:48:12 -0800 From: Mike Olson Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Fri, 13 Jan 95 07:46:08 -0800 Resent-XMts: smtp 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/