Re: strange pg_stats behaviour?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: depesz(at)depesz(dot)pl
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: strange pg_stats behaviour?
Date: 2002-11-30 16:05:01
Message-ID: 195.1038672301@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hubert depesz Lubaczewski <depesz(at)depesz(dot)pl> writes:
>> The planner doesn't know what value data_off will be compared to at
>> runtime, so it has to fall back on a default selectivity estimate.

> strange - is there no way we can "teach" him, that this is a constant. i
> mean now() - '31 days'::interval will be exactly the same for all rows
> of auction,

It knows that. What it doesn't know is how many rows of the table the
query is going to select, and that is exactly the thing it needs to know
to choose seqscan vs. indexscan.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Han Holl 2002-11-30 16:07:07 Re: Memory leak with palloc
Previous Message Tom Lane 2002-11-30 16:02:19 Re: Locale-dependent case conversion in {identifier}