pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Tim Uckun <timuckun@gmail.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Problems with adding a is not null to a query.
Date: Mon, 17 Jan 2011 15:57:20 -0500
Message-ID: <20744.1295297840@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTim4je4KYdbUykmfoCCjWf1GHcGDGxUb_XuQ6d2T@mail.gmail.com>
References: <AANLkTi=1DVjv6XdGSZ8H_LGvKdLBME4Gp15O0xnWv_8M@mail.gmail.com>
	<28545.1295106303@sss.pgh.pa.us>
	<AANLkTikFEyOOX2sWKB0vpCSeUKwaqo+vfTRJ_DMNTpcn@mail.gmail.com>
	<9026.1295198134@sss.pgh.pa.us>
	<AANLkTimFK6AWNo+k+RoMf3=4uu_iRcmTKtASwM3=eWO5@mail.gmail.com>
	<AANLkTi=6wYtWRURpUtBgJcZEMPGUne+emSmxL_sGbP6y@mail.gmail.com>
	<AANLkTim4je4KYdbUykmfoCCjWf1GHcGDGxUb_XuQ6d2T@mail.gmail.com>

Tim Uckun <timuckun@gmail.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



view thread (15+ messages)  latest in thread

Message-ID: <20744.1295297840@sss.pgh.pa.us>
Permalink:  ../20744.1295297840@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20744.1295297840@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, timuckun@gmail.com, robertmhaas@gmail.com
  Subject: Re: Problems with adding a is not null to a query.
  In-Reply-To: <20744.1295297840@sss.pgh.pa.us>
  References: <AANLkTi=1DVjv6XdGSZ8H_LGvKdLBME4Gp15O0xnWv_8M@mail.gmail.com> <28545.1295106303@sss.pgh.pa.us> <AANLkTikFEyOOX2sWKB0vpCSeUKwaqo+vfTRJ_DMNTpcn@mail.gmail.com> <9026.1295198134@sss.pgh.pa.us> <AANLkTimFK6AWNo+k+RoMf3=4uu_iRcmTKtASwM3=eWO5@mail.gmail.com> <AANLkTi=6wYtWRURpUtBgJcZEMPGUne+emSmxL_sGbP6y@mail.gmail.com> <AANLkTim4je4KYdbUykmfoCCjWf1GHcGDGxUb_XuQ6d2T@mail.gmail.com> <20744.1295297840@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox