From: Alvaro Herrera <alvherre@commandprompt.com>
To: Karl Wright <kwright@metacarta.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance query about large tables, lots of concurrent access
Date: Tue, 19 Jun 2007 11:50:23 -0400
Message-ID: <20070619155023.GQ4265@alvh.no-ip.org> (raw)
In-Reply-To: <4677F617.5000105@metacarta.com>
References: <4676DD57.7070304@metacarta.com>
<14291.1182221811@sss.pgh.pa.us>
<4677B831.8060704@metacarta.com>
<27690.1182263794@sss.pgh.pa.us>
<4677ECA9.3000402@metacarta.com>
<28036.1182264975@sss.pgh.pa.us>
<4677F617.5000105@metacarta.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: alvherre@commandprompt.com, kwright@metacarta.com, tgl@sss.pgh.pa.us
Subject: Re: Performance query about large tables, lots of concurrent access
In-Reply-To: <20070619155023.GQ4265@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox