Re: [ADMIN] How to change query planner configuration paramerters

2011-09-18 Thread Melaka Gunasekara
Thanks for the information Tom. It solved my confusion. On Sun, Sep 18, 2011 at 10:03 PM, Tom Lane wrote: > Craig Ringer writes: > > On 18/09/2011 5:51 PM, Melaka Gunasekara wrote: > >> Merge Full Join (cost=174.40..193.69 rows=1159 > width=286) > > >> Can you suggest why the me

Re: [ADMIN] How to change query planner configuration paramerters

2011-09-18 Thread Tom Lane
Craig Ringer writes: > On 18/09/2011 5:51 PM, Melaka Gunasekara wrote: >> Merge Full Join (cost=174.40..193.69 rows=1159 width=286) >> Can you suggest why the merge join is being suggested when I have >> turned it off ? > AFAIK SETting a join type to "off" really just increases

Re: [ADMIN] How to change query planner configuration paramerters

2011-09-18 Thread Craig Ringer
On 18/09/2011 5:51 PM, Melaka Gunasekara wrote: Merge Full Join (cost=174.40..193.69 rows=1159 width=286) Can you suggest why the merge join is being suggested when I have turned it off ? AFAIK SETting a join type to "off" really just increases the cost estimate so high th

Re: [ADMIN] How to change query planner configuration paramerters

2011-09-18 Thread Melaka Gunasekara
Hi Raghavendra, Thanks for your quick reply, I did as you suggessted and following is my output. melaka=# set enable_mergejoin to off; SET melaka=# show enable_mergejoin; enable_mergejoin -- off (1 row) Then I executed the following query melaka=# EXPLAIN select * from distribu

Re: [ADMIN] How to change query planner configuration paramerters

2011-09-18 Thread Raghavendra
postgres=# set enable_hashjoin to off; SET postgres=# show enable_hashjoin; enable_hashjoin - off (1 row) Above, changes applies for the current session (its Session-Level). If you want to do at Database-level use ALTER DATABASE and for entire Cluster-level edit postgresql.conf a

[ADMIN] How to change query planner configuration paramerters

2011-09-18 Thread Melaka Gunasekara
Hi all, I came across http://www.postgresql.org/docs/8.4/static/runtime-config-query.html which describes how to change query planner configuration paramerters. I need to know how I can change these parameters. For example if I need to turn off enable_hashjoin, how can I do that? Best Regards, M