Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id A41AE9FB2B8 for ; Fri, 29 Sep 2006 15:07:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 87820-09 for ; Fri, 29 Sep 2006 15:07:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 513A19FB223 for ; Fri, 29 Sep 2006 15:07:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k8TI7WPQ018274; Fri, 29 Sep 2006 14:07:32 -0400 (EDT) To: gurkan@resolution.com cc: pgsql-performance@postgresql.org Subject: Re: how to optimize postgres 8.1 In-reply-to: <1159549965.451d540d3a997@www.resolution.com> References: <1159549965.451d540d3a997@www.resolution.com> Comments: In-reply-to gurkan@resolution.com message dated "Fri, 29 Sep 2006 13:12:45 -0400" Date: Fri, 29 Sep 2006 14:07:32 -0400 Message-ID: <18273.1159553252@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.095 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/434 X-Sequence-Number: 21120 gurkan@resolution.com writes: > I need to increase performance on postgres, Well, for starters, have you ANALYZEd your tables? That EXPLAIN output looks suspiciously like default estimates. Then post EXPLAIN ANALYZE (not just EXPLAIN) results for your problem query. > If I run the query below with informix, it gives cost=107. > with postgres with additional indexes it gives cost=407, That comparison is meaningless --- I know of no reason to think that informix measures cost estimates on the same scale we do. It'd be interesting to see what query plan they use, though. regards, tom lane