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

2009-10-12 Thread 纪晓曦
What I want to count is the number of plans that have been considered cheapest_path. Since if a path is considered to be a cheapest_path, the postgres optimizer need to spent time on comparison. I think this is what I want. 2009/10/4 Martijn van Oosterhout klep...@svana.org On Sat, Oct 03,

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

2009-10-12 Thread 纪晓曦
Is it a reasonable idea to add a counter to set_cheapest? I think this function evaluate the cheapest path. Therefore, it means how many complete plans have been considered, doesn't it? 2009/10/12 纪晓曦 sheep...@gmail.com What I want to count is the number of plans that have been considered

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

2009-10-12 Thread Tom Lane
=?UTF-8?B?57qq5pmT5pum?= sheep...@gmail.com writes: Is it a reasonable idea to add a counter to set_cheapest? You can try it but I think you'll find it's not terribly useful. That will effectively just give you a count of the number of join combinations that were considered (plus the number of

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

2009-10-12 Thread 纪晓曦
Yeah, the problem is when I test large join, the plan considered by geqo is large than path. (3000+ vs 500+). However, the time used in optimizer of geqo is 1/4 of path. By the way, I use the same query. Another thing is for the join of 2 tables, geqo consider 60-90 plans. In general, I think for

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

2009-10-04 Thread Martijn van Oosterhout
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

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

2009-10-03 Thread 纪晓曦
Since I also need to consider gego, is this the best way to do it? 2009/9/30 Tom Lane t...@sss.pgh.pa.us =?UTF-8?B?57qq5pmT5pum?= sheep...@gmail.com writes: Where can I add a integer counter to count the plans considered by planner. Well, you could count the number of calls to add_path,

[GENERAL] Where can I get the number of plans that considered by Planner?

2009-09-30 Thread 纪晓曦
Where can I add a integer counter to count the plans considered by planner. In my opinion, it is in the src/backend/optimizer/path directorty.

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

2009-09-30 Thread Tom Lane
=?UTF-8?B?57qq5pmT5pum?= sheep...@gmail.com writes: Where can I add a integer counter to count the plans considered by planner. Well, you could count the number of calls to add_path, but a path is hardly the same thing as a complete plan. regards, tom lane -- Sent via