Re: Where can I get the number of plans that considered by Planner?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: ????????? <sheepjxx(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Postgres General Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Where can I get the number of plans that considered by Planner?
Date: 2009-10-04 11:35:54
Message-ID: 20091004113554.GA10726@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Oct 03, 2009 at 04:20:59PM +1000, ????????? wrote:
> Since I also need to consider gego, is this the best way to do it?

I think you need to be clearer about what you're trying to count.
Consider a nestjoin plan where:

- For the inner side it considers 7 paths and throws away 4.
- For the outer side it considers 6 paths and throws away 2.

Do you want the number 3*4=12 or 7*6=42? Or something in between (what
if in addition to a nestjoin plan otther possibilities are possible).

As you can see, you can't talk about complete plans because they don't
exist until right at the end, until then it's just considering how to
combine different paths in sensible ways.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2009-10-04 11:59:31 Re: query is taking longer time after a while
Previous Message tomrevam 2009-10-04 08:44:30 Re: query is taking longer time after a while