[RFC] pgstattuple/pgstatindex enhancement

From: Satoshi Nagayasu <snaga(at)uptime(dot)jp>
To: PostgreSQL Mailing Lists <pgsql-hackers(at)postgresql(dot)org>
Subject: [RFC] pgstattuple/pgstatindex enhancement
Date: 2013-02-12 15:22:36
Message-ID: 511A5E3C.9060105@uptime.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I'm thinking of pgstattuple/pgstatindex enhancement.

There are a few things I need to change, but I'd like to have
some comments and suggestions from hackers before tackling.

(1) Fix pgstatindex arguments to work same as pgstattuple.

As the document describes, pgstattuple accepts 'schema.table'
expression and oid of the table, but pgstatindex doesn't.
(because I didn't add that when I created pgstatindex...)

http://www.postgresql.org/docs/devel/static/pgstattuple.html

So, I'd like to change pgstatindex arguments to allow
schema name and oid.

Does it make sense?

(2) Enhance pgstattuple/pgstatindex to allow block sampling.

Now, we have large tables and indexes in PostgreSQL, and these are
growing day by day.

pgstattuple and pgstatindex are both very important to keep database
performance well, but doing full-scans on large tables and indexes
would generate big performance impact.

So, now I think pgstattuple and pgstatindex should support
'block sampling' to collect block statistics with avoiding full-scans.

With this block sampling feature, pgstattuple/pgstatindex would be
able to collect block statistics from 1~10% of the blocks in the
table/index if the table/index is large (maybe 10GB or more).

It would allow us to run pgstattuple/pgstatindex easier.

Is it worth having?

Any comments?

Regards,
--
Satoshi Nagayasu <snaga(at)uptime(dot)jp>
Uptime Technologies, LLC. http://www.uptime.jp

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-02-12 15:22:53 Re: Documentation: references to old versions
Previous Message Alvaro Herrera 2013-02-12 15:14:25 Re: [PATCH] Factor out pg_malloc and friends into port code