Skip site navigation (1) Skip section navigation (2)

Re: Use of index in 7.0 vs 6.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ryan Bradetich <ryan_bradetich(at)hp(dot)com>
Cc: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Use of index in 7.0 vs 6.5
Date: 2000-05-26 00:03:18
Message-ID: 917.959299398@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-sql
Ryan Bradetich <ryan_bradetich(at)hp(dot)com> 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

In response to

Responses

pgsql-sql by date

Next:From: Joseph ShraibmanDate: 2000-05-26 03:11:44
Subject: aliases break my query
Previous:From: Hiroshi InoueDate: 2000-05-26 00:02:50
Subject: RE: Use of index in 7.0 vs 6.5

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group