Re: PoC Refactor AM analyse API - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: PoC Refactor AM analyse API
Date
Msg-id CALNJ-vQK1qf1rDnZsH4n4T0-+oxDP=tp6=mTTWxt8jkbGKQL9A@mail.gmail.com
Whole thread Raw
In response to Re: PoC Refactor AM analyse API  (Denis Smirnov <sd@arenadata.io>)
Responses Re: PoC Refactor AM analyse API
List pgsql-hackers
Hi,

+       *totalrows = floor((liverows / bs.m) * totalblocks + 0.5);

Is the above equivalent to:

+       *totalrows = ceil((liverows / bs.m) * totalblocks);

For compare_rows(), it seems the computation of oa and ob can be delayed to when ba == bb (after the first two if statements).

Cheers

On Thu, Feb 18, 2021 at 6:06 PM Denis Smirnov <sd@arenadata.io> wrote:
Thanks for your review, Heikki.

I have made the changes you have requested.

1. All modifications interconnected with column projection were reverted (they should be added in https://commitfest.postgresql.org/31/2922 if the current patch would be merged one day).
2. I have returned PROGRESS_ANALYZE_* states.
3. qsort() was moved into heapam_acquire_sample_rows(). Also a comment was added, that the acquire_sample_rows() AM function must return the tuples in a physical table order.
4. table_beginscan_analyze() was removed as a redundant function.
5. acquire_sample_rows() comment about reservoir was changed.


Best regards,
Denis Smirnov | Developer
sd@arenadata.io
Arenadata | Godovikova 9-17, Moscow 129085 Russia

pgsql-hackers by date:

Previous
From: Paul Guo
Date:
Subject: Re: Two patches to speed up pg_rewind.
Next
From: Paul Guo
Date:
Subject: Re: Freeze the inserted tuples during CTAS?