| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | nickf(at)ontko(dot)com |
| Cc: | "pgsql-admin" <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Re: An Analyze question |
| Date: | 2002-04-22 16:56:40 |
| Message-ID: | 16789.1019494600@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
"Nick Fankhauser" <nickf(at)ontko(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nick Fankhauser | 2002-04-22 17:24:27 | Re: An Analyze question |
| Previous Message | Nick Fankhauser | 2002-04-22 16:05:20 | Re: An Analyze question |