Re: How to change query planner configuration paramerters - Mailing list pgsql-admin

From Melaka Gunasekara
Subject Re: How to change query planner configuration paramerters
Date
Msg-id CAM4Dy=27O0n9bvuETRdhCx3cR-24+ifmfNxm3CFNbA8_CKZsZA@mail.gmail.com
Whole thread Raw
In response to Re: How to change query planner configuration paramerters  (Raghavendra <raghavendra.rao@enterprisedb.com>)
Responses Re: How to change query planner configuration paramerters
List pgsql-admin
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 distributors full outer join films on distributors.did=films.did;
 
Then the output was
Merge Full Join (cost=10000000074.40..10000000093.69 rows=1159 width=286)
Merge Cond: (films.did = distributors.did)
-> Sort (cost=30.08..31.03 rows=380 width=184)
Sort Key: films.did
-> Seq Scan on films (cost=0.00..13.80 rows=380 width=184)
-> Sort (cost=44.32..45.85 rows=610 width=102)
Sort Key: distributors.did
-> Seq Scan on distributors (cost=0.00..16.10 rows=610 width=102)
(8 rows)
 
Can you suggest why the merge join is being suggested when I have turned it off ?

 
On Sun, Sep 18, 2011 at 3:05 PM, Raghavendra <raghavendra.rao@enterprisedb.com> wrote:
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 and do changes as per your requirement.

---
Regards,
Raghavendra
EnterpriseDB Corporation



On Sun, Sep 18, 2011 at 2:55 PM, Melaka Gunasekara <donmelaka@gmail.com> wrote:
Hi all,
 
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, 
Melaka





--
Best Regards, 
Melaka

pgsql-admin by date:

Previous
From: Raghavendra
Date:
Subject: Re: How to change query planner configuration paramerters
Next
From: Rural Hunter
Date:
Subject: Re: Problem of LD_LIBRARY_PATH