From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Claudio Freire <klaussfreire@gmail.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Shouldn't we have a way to avoid "risky" plans?
Date: Wed, 23 Mar 2011 17:05:12 -0700
Message-ID: <4D8A8AB8.7040401@agliodbs.com> (raw)
In-Reply-To: <4286.1300914004@sss.pgh.pa.us>
References: <4D8A29F2.9080105@agliodbs.com>
<AANLkTi=GAz7gFBCoXQeRDN3PUA0fXxRyP_=DxS4Y1tJU@mail.gmail.com>
<4D8A581D.5080704@agliodbs.com>
<AANLkTi=RXUSrCxqz3=BkAiixuenu2gf-K+W15Wz4McXH@mail.gmail.com>
<4286.1300914004@sss.pgh.pa.us>
> If the planner starts operating on the basis of worst case rather than
> expected-case performance, the complaints will be far more numerous than
> they are today.
Yeah, I don't think that's the way to go. The other thought I had was
to accumulate a "risk" stat the same as we accumulate a "cost" stat.
However, I'm thinking that I'm overengineering what seems to be a fairly
isolated problem, in that we might simply need to adjust the costing on
this kind of a plan.
Also, can I say that the cost figures in this plan are extremely
confusing? Is it really necessary to show them the way we do?
Merge Join (cost=29.16..1648.00 rows=382 width=78) (actual
time=57215.167..57215.216 rows=1 loops=1)
Merge Cond: (rn.node_id = device_nodes.node_id)
-> Nested Loop (cost=0.00..11301882.40 rows=6998 width=62) (actual
time=57209.291..57215.030 rows=112 loops=1)
Join Filter: (node_ep.node_id = rn.node_id)
-> Nested Loop (cost=0.00..11003966.85 rows=90276 width=46)
(actual time=0.027..52792.422 rows=90195 loops=1)
The first time I saw the above, I thought we had some kind of glibc math
bug on the host system. Costs are supposed to accumulate upwards.
--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com
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: josh@agliodbs.com, tgl@sss.pgh.pa.us, klaussfreire@gmail.com
Subject: Re: Shouldn't we have a way to avoid "risky" plans?
In-Reply-To: <4D8A8AB8.7040401@agliodbs.com>
* 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