Re: optimize the value of vacthresh and anlthresh

From: wenhui qiu <qiuwenhuifx(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: optimize the value of vacthresh and anlthresh
Date: 2024-11-06 06:32:16
Message-ID: CAGjGUALp6nWkTBn=0NE9KXg0jcrUfsN915YLYxvp1YAy+x20EA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers
Here new path , I think it is most appropriate to use a logarithmic
function with base 2

Thanks

wenhui qiu <qiuwenhuifx(at)gmail(dot)com> 于2024年11月6日周三 11:44写道:

> Hi hackers
> I find that the arithmetic square root is not very smooth, and the
> logarithmic function is smoother,Looking at the graph, the log function
> algorithm might be more appropriate,I want to hear from the experts
>
> sqrt
>
> [image: image.png]
> log2
>
> [image: image.png]
>
> log
> [image: image.png]
> orginal
> [image: image.png]
> postgres=# select ln(100000)*1000;
> ?column?
> --------------------
> 11512.925464970229
> (1 row)
>
> postgres=# select log(2,100000)*1000;
> ?column?
> -----------------------
> 16609.640474436812000
> (1 row)
>
> postgres=#
>
> postgres=# select log(10,100000)*1000;
> ?column?
> ----------------------
> 5000.000000000000000
> (1 row)
>
>
>
> wenhui qiu <qiuwenhuifx(at)gmail(dot)com> 于2024年11月4日周一 16:30写道:
>
>> Hi hackers
>> A few days ago, I was looking at the sql server documentation and
>> found that sql server has optimized the algorithm related to updating
>> statistics in the 2016 ,version,I think we can also learn from the
>> implementation method of sql server to optimize the problem of automatic
>> vacuum triggered by large tables,The Document link(
>> https://learn.microsoft.com/en-us/sql/relational-databases/statistics/statistics?view=sql-server-ver16),I
>> refer to the sql server implementation method, submit a patch, please see
>> the attachment, hope to get the help of expert hackers
>>
>

Attachment Content-Type Size
0002-optimize-the-value-of-vacthresh-and-anlthresh.patch application/octet-stream 1.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2024-11-06 07:04:00 can_partial_agg use root->processed_groupClause instead of parse->groupClause
Previous Message Amit Kapila 2024-11-06 06:25:04 Re: Pgoutput not capturing the generated columns