X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5949752A03 for ; Tue, 19 Jul 2005 16:02:28 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88427-06 for ; Tue, 19 Jul 2005 19:02:17 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 846D1529FA for ; Tue, 19 Jul 2005 16:02:16 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j6JJ10ZW008447; Tue, 19 Jul 2005 15:01:00 -0400 (EDT) To: Oliver Crosby Cc: "Joshua D. Drake" , pgsql-performance@postgresql.org Subject: Re: Looking for tips In-reply-to: <1efd553a050719112126b8d981@mail.gmail.com> References: <1efd553a05071910427b290203@mail.gmail.com> <42DD3D55.9020508@commandprompt.com> <1efd553a050719112126b8d981@mail.gmail.com> Comments: In-reply-to Oliver Crosby message dated "Tue, 19 Jul 2005 14:21:22 -0400" Date: Tue, 19 Jul 2005 15:01:00 -0400 Message-ID: <8446.1121799660@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200507/311 X-Sequence-Number: 13552 Oliver Crosby writes: > The queries are all simple insert or select statements on single tables. > Eg. select x from table where y=?; or insert into table (a, b, c) > values (?, ?, ?); > In the case of selects where it's a large table, there's an index on > the column being searched, so in terms of the example above, x is > either a pkey column or other related field, and y is a non-pkey > column. If you're running only a single query at a time (no multiple clients), then this is pretty much the definition of a MySQL-friendly workload; I'd have to say we are doing really well if we are only 50% slower. Postgres doesn't have any performance advantages until you get into complex queries or a significant amount of concurrency. You could possibly get some improvement if you can re-use prepared plans for the queries; but this will require some fooling with the client code (I'm not sure if DBD::Pg even has support for it at all). regards, tom lane