Re: Deceiding which index to use

From: Richard Huxton <dev(at)archonet(dot)com>
To: Mezei Zoltán <mezei(dot)zoltan(at)telefor(dot)hu>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Deceiding which index to use
Date: 2007-03-09 16:18:57
Message-ID: 45F188F1.4010905@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mezei Zoltán wrote:
> Richard Huxton wrote:
>>
>> There is a cost to increasing the stats values, otherwise it'd
>> already be set at 1000. In your case I'm not sure if 100-200 vs 8-9
>> messages is enough to skew things. Only one way to find out...
>>
> Well, I tried. The situation is:
>
> - when I look for a subscriber which the planner thinks to have more
> messages --> it uses the index on crd - when I look for a subscriber
> which the planner thinks to have less messages --> it uses the index
> on subscriber_id
>
> I think that's OK, even if it still don't do what I really would like
> to see it do :-)

Well, it's decision about where the costs cross over will be in the
other "cost" settings in postgresql.conf. The thing is, it's not worth
tuning for just this one query, because you can easily end up running
everything else more slowly.

> Thanks for all your help, maybe I know a little bit more about
> poostgresql than before.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Axel Rau 2007-03-09 17:39:33 Re: configuring new server / many slow disks?
Previous Message Richard Huxton 2007-03-09 16:17:43 Re: Deceiding which index to use