Re: Is this planner choice easily explained? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Is this planner choice easily explained?
Date
Msg-id 12008.1037892740@sss.pgh.pa.us
Whole thread Raw
In response to Is this planner choice easily explained?  (Philip Warner <pjw@rhyme.com.au>)
Responses Re: Is this planner choice easily explained?  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-bugs
Philip Warner <pjw@rhyme.com.au> writes:
> I am trying to understand some apparently odd behaviour with 7.2.1 and
> 7.2.3. Adding a LIMIT statement causes what seems like a very bad choice of
> strategy. The first statement is fine:

Could we see the pg_stats rows for the columns used in these queries?
(You have done a vacuum analyze recently, I trust...)

> If anyone could explain the likely reasons for the choice, I would be very
> interested. Even given the planner estimates, they don't look like sensible
> choices.

Why do you say that?  It's taking a plan estimated at 777 cost units
over one that is estimated at (presumably) 5793 units.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Philip Warner
Date:
Subject: Is this planner choice easily explained?
Next
From: Philip Warner
Date:
Subject: Re: Is this planner choice easily explained?