Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id UAA30228 for ; Thu, 25 May 2000 20:03:33 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id UAA00920; Thu, 25 May 2000 20:03:18 -0400 (EDT) To: Ryan Bradetich cc: Hiroshi Inoue , pgsql-sql@postgresql.org Subject: Re: Use of index in 7.0 vs 6.5 In-reply-to: <392DB9F3.2907B731@hp.com> References: <000e01bfc619$9fa5f9c0$2801007e@tpf.co.jp> <22559.959265549@sss.pgh.pa.us> <392DB9F3.2907B731@hp.com> Comments: In-reply-to Ryan Bradetich message dated "Thu, 25 May 2000 17:40:35 -0600" Date: Thu, 25 May 2000 20:03:18 -0400 Message-ID: <917.959299398@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200005/150 Ryan Bradetich writes: > This worked great! Is their a place I can change the default to 3? > I do not want to change all the scripts to include this :) See src/include/optimizer/cost.h. However, I am currently thinking of taking Hiroshi's advice instead. Lowering RANDOM_PAGE_COST seems like a bad idea --- if anything, we might want to raise it ;-) >>>> Or how about changing current fudge factor ? >>>> For example,from 0.5 to 0.2 which is the fudge factor of attdisbursion >>>> calculation. >> >> Yes, that's another way --- and probably more defensible than changing >> random_page_cost, now that I think about it. Unfortunately it's a >> hardwired constant and so not as easily experimented with :-(. > Can you give me more information about this? I do not have a problem > re-compiling the database and performing more testing if you would like. The fudge factor in question is currently 0.5, and is used in two places in src/backend/utils/adt/selfuncs.c (looks like lines 193 and 212 in 7.0 sources). I was thinking of dropping it to 0.25 or 0.1. regards, tom lane