X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 124269FA15C for ; Mon, 8 May 2006 20:06:15 -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 20079-07 for ; Mon, 8 May 2006 20:06:04 -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 B7C6E9F9D82 for ; Mon, 8 May 2006 20:06:04 -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 k48N61WN002399; Mon, 8 May 2006 19:06:01 -0400 (EDT) To: Jeffrey Tenny cc: "Jim C. Nasby" , pgsql-performance@postgresql.org Subject: Re: performance question (something to do w/ parameterized In-reply-to: <445FC215.8070804@comcast.net> References: <445F7FF8.6070707@comcast.net> <20060508173812.GW99570@pervasive.com> <445F9F6B.9040200@comcast.net> <29345.1147118920@sss.pgh.pa.us> <445FAB2A.9050401@comcast.net> <29684.1147121398@sss.pgh.pa.us> <445FC215.8070804@comcast.net> Comments: In-reply-to Jeffrey Tenny message dated "Mon, 08 May 2006 18:11:33 -0400" Date: Mon, 08 May 2006 19:06:01 -0400 Message-ID: <2398.1147129561@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/160 X-Sequence-Number: 18947 Jeffrey Tenny writes: > I tried the seqscan disabling and got what sounds like the desired plan: > Sort (cost=54900.62..54940.29 rows=1587 width=16) (actual time=20.208..22.138 rows=677 loops=1) > Sort Key: f, c > -> Index Scan using x_f_idx, x_f_idx, ... > (cost=0.00..54056.96 rows=1587 width=16) (actual time=1.048..15.598 rows=677 loops=1) > Index Cond: ((f = 1) OR (f = 2) OR (f = 3) .... Hm, vs 35000 or so estimates for the slower plans. My recommendation would be to decrease random_page_cost to 2 or so, instead of the brute force disable-seqscans approach. regards, tom lane