Re: Performance query about large tables, lots of concurrent access - Mailing list pgsql-performance

From Alvaro Herrera
Subject Re: Performance query about large tables, lots of concurrent access
Date
Msg-id 20070619155023.GQ4265@alvh.no-ip.org
Whole thread Raw
In response to Re: Performance query about large tables, lots of concurrent access  (Karl Wright <kwright@metacarta.com>)
List pgsql-performance
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.

pgsql-performance by date:

Previous
From: Francisco Reyes
Date:
Subject: Re: Performance query about large tables, lots of concurrent access
Next
From: Tom Lane
Date:
Subject: Re: Maintenance question / DB size anomaly...