Re: Problems with adding a is not null to a query.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tim Uckun <timuckun(at)gmail(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Problems with adding a is not null to a query.
Date: 2011-01-17 20:57:20
Message-ID: 20744.1295297840@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Tim Uckun <timuckun(at)gmail(dot)com> writes:
> relname | pg_relation_size | reltuples | relpages
> ------------------------+------------------+-------------+----------
> consolidated_urls | 1303060480 | 1.80192e+06 | 159065
> consolidated_urls_pkey | 114745344 | 1.80192e+06 | 14007

With a table that large, you're probably going to need a larger stats
target in order to get reasonable estimates for low-frequency values.
Am I right in guessing that pg_stats.n_distinct is much too low for
the domain_id column?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tim Uckun 2011-01-17 22:14:06 Re: Problems with adding a is not null to a query.
Previous Message Tom Lane 2011-01-17 18:17:03 Re: BUG #5840: Updating arrays using subscripted assignment results in uninitialized values