Skip site navigation (1) Skip section navigation (2)

Re: planner/optimizer question

From: Jeff <threshar(at)torgo(dot)978(dot)org>
To: "Gary Doades" <gpd(at)gpdnet(dot)co(dot)uk>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: planner/optimizer question
Date: 2004-04-30 12:32:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On Apr 30, 2004, at 3:01 AM, Gary Doades wrote:

[ pg query plan, etc ]

I wonder if other parts of the plan are affecting the speed.

I've recently run into a case where a merge join plan was chosen for 
this query, which took 11 seconds to execute.  Forcing it to pick a 
nested loop join dropped it to 3.  (Updating my 
default_statistics_target to 500 caused the planner to choose nested 
loop join)

So, is the plan really the same?

  A better comparision query may be a simple "select a from mytable 
where a between foo and bar"  to get an index scan.  In that case its a 
straight up, vanilla index scan.  Nothing else getting in the way.

Jeff Trout <jeff(at)jefftrout(dot)com>

In response to


pgsql-performance by date

Next:From: Pailloncy Jean-GĂ©rardDate: 2004-04-30 12:45:55
Subject: Re: Fwd: FreeBSD, PostgreSQL, semwait and sbwait!
Previous:From: Manfred KoizarDate: 2004-04-30 07:33:13
Subject: Re: analyzer/planner and clustered rows

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group