Re: RT3.4 query needed a lot more tuning with 9.2 than it did with 8.1

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christoph Berg <christoph(dot)berg(at)credativ(dot)de>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: RT3.4 query needed a lot more tuning with 9.2 than it did with 8.1
Date: 2013-05-13 20:29:29
Message-ID: CA+TgmoZ3PaO23NNvKfn1CQm2c7xCfsLX9=94pm0=6t9UCC6Edw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, May 13, 2013 at 4:14 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> The planner is estimating this the outer side of this nested loop will
>> produce 33 rows and that the inner side will produce 1. One would
>> assume that the row estimate for the join product couldn't be more
>> than 33 * 1 = 33 rows, but the planner is estimating 62335 rows, which
>> seems like nonsense.
>
> You know, of course, that the join size estimate isn't arrived at that
> way. Still, this point does make it seem more like a planner bug and
> less like bad input stats. It would be nice to see a self-contained
> example ...

Yeah, I remember there have been examples like this that have come up
before. Unfortunately, I haven't fully grokked what's actually going
on here that allows this kind of thing to happen. Refresh my memory
on where the relevant code is?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2013-05-13 20:33:19 Re: RT3.4 query needed a lot more tuning with 9.2 than it did with 8.1
Previous Message Tom Lane 2013-05-13 20:14:06 Re: RT3.4 query needed a lot more tuning with 9.2 than it did with 8.1