Re: Fuzzy cost comparison to eliminate redundant planning

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Fuzzy cost comparison to eliminate redundant planning
Date: 2004-03-29 01:32:03
Message-ID: 40677C93.7070405@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> As an experiment, I made the attached patch that converts add_path's
> cost comparisons to "fuzzy" comparisons --- two paths are considered to
> have the same cost if it differs by less than 1% of the smaller
> total_cost. I found that this reduced the planning time of Eric's
> query by about 40%, without changing the resulting plan. On more
> typical queries where the relations all have different statistics,
> I doubt it would have as much effect, but I'm inclined to apply the
> change anyway.

It looks like a great idea to me...

> + * XXX does this percentage need to be user-configurable?

...but I think the answer to the above is yes.

Joe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-03-29 01:39:46 Re: Fuzzy cost comparison to eliminate redundant planning work
Previous Message Tom Lane 2004-03-28 22:30:35 Re: Fuzzy cost comparison to eliminate redundant planning work