Re: Performance query about large tables, lots of concurrent access

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Karl Wright <kwright(at)metacarta(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance query about large tables, lots of concurrent access
Date: 2007-06-19 15:50:23
Message-ID: 20070619155023.GQ4265@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Josh 2007-06-19 16:03:46 Re: [PERFORM] Postgres VS Oracle
Previous Message Francisco Reyes 2007-06-19 15:49:58 Re: Performance query about large tables, lots of concurrent access