I think your first thought was good. How high ? I think it's a matter of convention, certainly more than default 100.
czw., 21 lis 2019 o 02:05 Andy Fan <zhihui.fan1...@gmail.com> napisaĆ(a): > > > On Thu, Oct 31, 2019 at 11:07 PM Tom Lane <t...@sss.pgh.pa.us> wrote: > >> >> >> Possibly this could be finessed by only trying to find duplicates of >> functions that have high cost estimates. Not sure how high is high >> enough. > > > can we just add a flag on pg_proc to show if the cost is high or not, if > user are not happy with that, they can change it by updating the value? > based on that most of the function call cost are low, this way may be > helpful for the searching of duplicate expressions. >