Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-06 Thread Quan Zongliang
On 2023/9/6 17:07, John Naylor wrote: On Wed, Sep 6, 2023 at 2:50 PM Quan Zongliang > wrote: > If not optimized(--enable-debug CFLAGS='-O0'), there is a clear > difference. When the compiler does the optimization, the performance is > similar. I think the

Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-06 Thread John Naylor
On Wed, Sep 6, 2023 at 2:50 PM Quan Zongliang wrote: > If not optimized(--enable-debug CFLAGS='-O0'), there is a clear > difference. When the compiler does the optimization, the performance is > similar. I think the compiler does a good enough optimization with > "pg_attribute_always_inline" and

Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-06 Thread Quan Zongliang
On 2023/9/6 15:50, Quan Zongliang wrote: On 2023/9/5 18:46, John Naylor wrote: On Tue, Sep 5, 2023 at 4:27 PM Quan Zongliang > wrote:  > Here's how I test it  >     EXPLAIN ANALYZE SELECT * FROM orders; Note that EXPLAIN ANALYZE has quite a bit of

Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-06 Thread Quan Zongliang
On 2023/9/5 18:46, John Naylor wrote: On Tue, Sep 5, 2023 at 4:27 PM Quan Zongliang > wrote: > Here's how I test it >     EXPLAIN ANALYZE SELECT * FROM orders; Note that EXPLAIN ANALYZE has quite a bit of overhead, so it's not good for these kinds of

Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-05 Thread John Naylor
On Tue, Sep 5, 2023 at 4:27 PM Quan Zongliang wrote: > Here's how I test it > EXPLAIN ANALYZE SELECT * FROM orders; Note that EXPLAIN ANALYZE has quite a bit of overhead, so it's not good for these kinds of tests. > I'll also try Andres Freund's test method next. Commit f691f5b80a85 from

Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-05 Thread Quan Zongliang
On 2023/9/5 16:15, John Naylor wrote: On Thu, Aug 24, 2023 at 5:55 PM Quan Zongliang > wrote: > In the function heapgetpage. If a table is not updated very frequently. > Many actions in tuple loops are superfluous. For all_visible pages, > loctup does not

Re: Improving the heapgetpage function improves performance in common scenarios

2023-09-05 Thread John Naylor
On Thu, Aug 24, 2023 at 5:55 PM Quan Zongliang wrote: > In the function heapgetpage. If a table is not updated very frequently. > Many actions in tuple loops are superfluous. For all_visible pages, > loctup does not need to be assigned, nor does the "valid" variable. >