"Nick Fankhauser" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to