Re: generalizing the planner knobs - Mailing list pgsql-hackers

From Jim C. Nasby
Subject Re: generalizing the planner knobs
Date
Msg-id 20051208053545.GI16053@nasby.net
Whole thread Raw
In response to Re: generalizing the planner knobs  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
Responses Re: generalizing the planner knobs
List pgsql-hackers
On Thu, Dec 01, 2005 at 12:32:12PM -0500, Qingqing Zhou wrote:
> 
> "Neil Conway" <neilc@samurai.com> wrote
> >
> > This would also be useful when diagnosing bad query plans: for example,
> > setting enable_seqscan=false often causes the planner to disregard the
> > use of *any* sequential scan, anywhere in the plan. The ability to
> > slightly bump up the cost of particular operations would allow more
> > alternative plans to be examined.
> >
> 
> This method also has the problem of "enable_seqscan=false" in some 
> situations. I would vote we implement the final general solution like query 
> plan hints directly.

BTW, there's another end to the 'enable_seqscan=false' problem... it
sometimes doesn't work! Last I looked, enable_seqscan=false only added a
fixed overhead cost to a seqscan (1000000 IIRC). The problem is, some
queries will produce estimates for other methodes that are more
expensive than a seqscan even with the added burden. If instead of
adding a fixed amount enable_seqscan=false multiplied by some amount
then this would probably be impossible to occur.

(And before someone asks, no, I don't remember which query was actually
faster...)
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Vertical Partitioning with TOAST
Next
From: Tom Lane
Date:
Subject: Re: Vertical Partitioning with TOAST