[HACKERS] Ideas of printing out the alternative paths

2013-11-14 Thread Zhan Li
When searching all the possible paths of executing a query, the optimizer finds and saves the cheapest paths for the top level rel. I'd like to check out all the paths the optimizer has ever considered, which I believe, are stored in the pathlist of the top level rel. But I do not have an idea of

Re: [HACKERS] Ideas of printing out the alternative paths

2013-11-14 Thread Zhan Li
mentioned people have printed something about each path, can you please give me a hint of what's that and how to achieve that? On Thu, Nov 14, 2013 at 12:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: Zhan Li zhanl...@gmail.com writes: When searching all the possible paths of executing a query

[HACKERS] Force optimizer to use hash/nl/merge join?

2013-11-18 Thread Zhan Li
Hi All, Is there any way to force the optimizer to use a specific join operator? For example, in SQL Server, I can do this way select * from (A inner hash join B on A.a = B.b) inner loop join C on A.a = C.c I did some search but didn't find PostgreSQL had similar join hints except for enable_*