public inbox for [email protected]
help / color / mirror / Atom feedFrom: Laurenz Albe <[email protected]>
To: Sam Stearns <[email protected]>
To: Pgsql-admin <[email protected]>
Cc: Henry Ashu <[email protected]>
Subject: Re: Postgres Load Profile
Date: Tue, 04 Nov 2025 06:25:35 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAN6TVjmH8=dszn3WqSE4MsYEZgCT1gQhufoSnPBn-Omcu9-EkQ@mail.gmail.com>
References: <CAN6TVjmH8=dszn3WqSE4MsYEZgCT1gQhufoSnPBn-Omcu9-EkQ@mail.gmail.com>
On Mon, 2025-11-03 at 14:56 -0800, Sam Stearns wrote:
> Does Postgres have any tables you can query to find out information such as:
> * Logical reads
> * Block changes
> * Physical reads
> * Physical writes
> * Read IO requests
> * Write IO requests
> * Read IO (MB)
> * Write IO (MB)
> * User calls
> * Parses (SQL)
> * Hard parses (SQL)
> * Executes (SQL)
> * Transactions per second
That smells like Oracle database.
PostgreSQL does things differently, so not all of the above measures make sense.
To make up, there are things that you should measure in a PostgreSQL database
that don't exist in an Oracle database.
PostgreSQL doesn't do direct I/O, so it has no control over which read requests
actually cause I/O to happen and which ones can be satisfied from the kernel
page cache.
You can find statistics about read and write activity in pg_stat_database
(per database) and pg_stat_statements (per statement). pg_stat_statements will
also tell you how often statements were executed.
In PostgreSQL, statements are always planned, unless you explicitly use a
prepared statement or run static SQL from a function.
You might want to look at pg_stat_io for overall I/O statistics per operation
and object type.
You also should look at pg_stat_all_tables for activities per table, including
the important VACUUM-related statistics.
Yours,
Laurenz Albe
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Postgres Load Profile
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox