Karl Wright wrote:
> I did an ANALYZE on that table and repeated the explain, and got this:
>
> >>>>>>
> metacarta=> analyze intrinsiclink;
> ANALYZE
> metacarta=> explain select count(*) from intrinsiclink where
> jobid=1181766706097 and
> childidhash='7E130F3B688687757187F1638D8776ECEF3009E0';
> QUERY PLAN
>
>
------------------------------------------------------------------------------------------------------------------------------------
> Aggregate (cost=15276.36..15276.37 rows=1 width=0)
> -> Index Scan using i1181764142395 on intrinsiclink
> (cost=0.00..15255.53 rows=8333 width=0)
> Index Cond: ((jobid = 1181766706097::bigint) AND
> ((childidhash)::text = '7E130F3B688687757187F1638D8776ECEF3009E0'::text))
> (3 rows)
> <<<<<<
>
> ... even more wildly wrong.
Interesting. What is the statistics target for this table? Try
increasing it, with ALTER TABLE ... SET STATISTICS, rerun analyze, and
try again.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.