Re: How to inject knowledge into a Postgres database

From: han(dot)holl(at)informationslogik(dot)nl
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to inject knowledge into a Postgres database
Date: 2005-10-13 10:14:20
Message-ID: 200510131214.20775.han.holl@informationslogik.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 11 October 2005 01:50, Jim C. Nasby wrote:
> What's the datatype on naamvrouw? Notice that it's being casted to text,
> which means an index on that column won't be used.
>
Datatype is text. My problem is that I want it to use the date of birth index.

I've increased the statistics to 1000, and only occasionally, because of the
very uneven distribution of surnames, the planner does the wrong thing.
(Thinking that only 14 rows will match 'blaa' instead of 767.)

I've tried to set an even higher limit, but 1000 seems to be the maximum.
Is this hardcoded, or can I set a higher maximum somewhere ?

If the only penalty is slower analyzing, I don't care: we analyze at night
when these system are idle.

Cheers,

Han Holl

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josephine E. de Castro 2005-10-13 10:36:19 Question about stored procedures
Previous Message Andreas Pflug 2005-10-13 08:52:58 Re: [GENERAL] Oracle buys Innobase