Re: [GENERAL] demystifying nested loop vs. merge join query plan choice

2013-08-02 Thread Jeff Janes
On Thu, Aug 1, 2013 at 4:50 PM, BladeOfLight16 wrote: > On Thu, Aug 1, 2013 at 10:25 AM, Sandeep Gupta > wrote: >> >> @Jeff : Thanks for pointing this out. Turns out that was the case. >> >> @Tom: Thank you for the reference to random_page_cost parameters. It would >> be very useful for us. Would

Re: [GENERAL] demystifying nested loop vs. merge join query plan choice

2013-08-01 Thread BladeOfLight16
On Thu, Aug 1, 2013 at 10:25 AM, Sandeep Gupta wrote: > @Jeff : Thanks for pointing this out. Turns out that was the case. > > @Tom: Thank you for the reference to random_page_cost parameters. It would > be very useful for us. Would go through the rest of the documentation as > well. > I can't sa

Re: [GENERAL] demystifying nested loop vs. merge join query plan choice

2013-08-01 Thread Sandeep Gupta
@Jeff : Thanks for pointing this out. Turns out that was the case. @Tom: Thank you for the reference to random_page_cost parameters. It would be very useful for us. Would go through the rest of the documentation as well. On Wed, Jul 31, 2013 at 3:55 PM, Tom Lane wrote: > Sandeep Gupta writes:

Re: [GENERAL] demystifying nested loop vs. merge join query plan choice

2013-07-31 Thread Tom Lane
Sandeep Gupta writes: > details regarding buffer usage: > [ 100% buffer hit rate ] Your database is evidently fully cached in memory. If that's the operating mode you expect, you need to change the planner's cost parameters, in particular reduce random_page_cost to equal seq_page_cost. There is

Re: [GENERAL] demystifying nested loop vs. merge join query plan choice

2013-07-31 Thread Sandeep Gupta
details regarding buffer usage: for database 1: QUERY PLAN --- Aggregate (cos

Re: [GENERAL] demystifying nested loop vs. merge join query plan choice

2013-07-31 Thread Sandeep Gupta
Hi Pavel, Yes. The postgresql.conf is exactly the same. The have the same index and clustering and are on the same compute node as well but running on different ports. -Sandeep On Wed, Jul 31, 2013 at 3:14 PM, Pavel Stehule wrote: > Hello > > do you have same configuration? > > Regards > >

Re: [GENERAL] demystifying nested loop vs. merge join query plan choice

2013-07-31 Thread Pavel Stehule
Hello do you have same configuration? Regards Pavel 2013/7/31 Sandeep Gupta : > I have two postgres instances each with a database of same schema. The > dataset in both is ''same'' but for randomness i.e. both contain two tables > pc(did) and tc(pid, did) that have almost > same number of row

[GENERAL] demystifying nested loop vs. merge join query plan choice

2013-07-31 Thread Sandeep Gupta
I have two postgres instances each with a database of same schema. The dataset in both is ''same'' but for randomness i.e. both contain two tables pc(did) and tc(pid, did) that have almost same number of rows and have been generate from same distribution. However the query plan for the join turn