Re: Is this planner choice easily explained?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Is this planner choice easily explained?
Date: 2002-11-21 15:32:20
Message-ID: 12008.1037892740@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Philip Warner <pjw(at)rhyme(dot)com(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Merlin Moncure 2002-11-21 16:18:34 Re: posgres on win2k, install cygipc
Previous Message Harris Peter 2002-11-21 15:21:56 Minor build nits in 7.3rc1