From: Tom Lane <tgl@sss.pgh.pa.us>
To: nickf@ontko.com
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: An Analyze question
Date: Mon, 22 Apr 2002 12:56:40 -0400
Message-ID: <16789.1019494600@sss.pgh.pa.us> (raw)
In-Reply-To: <NEBBLAAHGLEEPCGOBHDGGEDMENAA.nickf@ontko.com>
References: <NEBBLAAHGLEEPCGOBHDGGEDMENAA.nickf@ontko.com>
"Nick Fankhauser" <nickf@ontko.com> writes:
>> Offhand I would think that 7.2 is smart enough to deal with this
> We're on 7.1.3.
Hmm... I don't see why it would make any difference in 7.1
either. You weren't by any chance selecting on the most common
actor_id were you? Really 7.1 only has two possible selectivity
estimates for column = 'constant' --- either the constant is the
stored most-common-value, or it ain't. What do you get from
select attname,attdispersion,s.*
from pg_statistic s, pg_attribute a, pg_class c
where starelid = c.oid and attrelid = c.oid and staattnum = attnum
and relname = 'actor_case_assignment';
in each database?
> Here are the before & after explains again:
> Before:
> monroe=# explain select * from actor_cases where actor_id = '18105A7313 53';
> After:
> develop=# explain select * from actor_cases where actor_id = '18105A7313 53';
Are you really comparing apples to apples here? I'd think that a proper
comparison of plans would be
monroe=# explain select * from actor_cases where actor_id = 'A7313 53';
develop=# explain select * from actor_cases where actor_id = '18105A7313 53';
regards, tom lane
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, nickf@ontko.com
Subject: Re: An Analyze question
In-Reply-To: <16789.1019494600@sss.pgh.pa.us>
References: <NEBBLAAHGLEEPCGOBHDGGEDMENAA.nickf@ontko.com> <16789.1019494600@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