Re: Make the qual cost on index Filter slightly higher than qual coston index Cond. - Mailing list pgsql-hackers

From Andy Fan
Subject Re: Make the qual cost on index Filter slightly higher than qual coston index Cond.
Date
Msg-id CAKU4AWqe+L-Lm0srM7qPkygPknYCscv-RiG=pO8_XnUjqYRrrA@mail.gmail.com
Whole thread Raw
In response to Re: Make the qual cost on index Filter slightly higher than qual coston index Cond.  (Andy Fan <zhihui.fan1213@gmail.com>)
List pgsql-hackers

The other serious error we could be making here is to change things on
the basis of just a few examples.  You really need a pretty wide range
of test cases to be sure that you're not making things worse, any time
you're twiddling basic parameters like these.


I will try more thing with this direction,  thanks for suggestion.   

I choose TPC-H for this purpose and the data and index setup based on [1],
the attached normal.log is the plan without this patch, and patched.log is the
plan with the patch.  In general,  the best path doesn't change due to this patch,
All the plans whose cost changed has the following patten, which is expected.

Index Scan ...
   Index Cond: ...
   Filter: ...

If you diff the two file, you may find the cost of "Index Scan" doesn't change,
that is mainly because it only show 2 digits in cost, which is not accurate enough
to show the difference.  However with a nest loop,  the overall plan shows the cost
difference. 


--
Best Regards
Andy Fan
Attachment

pgsql-hackers by date:

Previous
From: Andy Fan
Date:
Subject: Re: Make the qual cost on index Filter slightly higher than qual coston index Cond.
Next
From: Pavel Stehule
Date:
Subject: proposal: possibility to read dumped table's name from file