pgsql: Use pre-fetching for ANALYZE

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use pre-fetching for ANALYZE
Date: 2021-03-16 18:48:08
Message-ID: E1lMEjg-0006Mm-Na@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Use pre-fetching for ANALYZE

When we have posix_fadvise() available, we can improve the performance
of an ANALYZE by quite a bit by using it to inform the kernel of the
blocks that we're going to be asking for. Similar to bitmap index
scans, the number of buffers pre-fetched is based off of the
maintenance_io_concurrency setting (for the particular tablespace or,
if not set, globally, via get_tablespace_maintenance_io_concurrency()).

Reviewed-By: Heikki Linnakangas, Tomas Vondra
Discussion: https://www.postgresql.org/message-id/VI1PR0701MB69603A433348EDCF783C6ECBF6EF0%40VI1PR0701MB6960.eurprd07.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c6fc50cb40285141fad401321ae21becbaea1c59

Modified Files
--------------
src/backend/commands/analyze.c | 73 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 71 insertions(+), 2 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2021-03-16 19:48:14 pgsql: Fix a confusing amcheck corruption message.
Previous Message Tom Lane 2021-03-16 15:16:51 pgsql: Improve logging of bad parameter values in BIND messages.

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-03-16 18:52:22 Re: pg_amcheck contrib application
Previous Message Joe Conway 2021-03-16 18:45:36 Re: "has_column_privilege()" issue with attnums and non-existent columns