public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: James Salsman <[email protected]>
Cc: [email protected]
Subject: Re: monitoring-stats.html is too impenetrable
Date: Fri, 6 Dec 2019 12:04:45 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAD4=uZZRYy8bkedyRipiu0Yp0ZTUszUg6RUTuNnmSs6Y1i2-fA@mail.gmail.com>
References: <[email protected]>
	<[email protected]>
	<CAD4=uZZRYy8bkedyRipiu0Yp0ZTUszUg6RUTuNnmSs6Y1i2-fA@mail.gmail.com>

On Wed, Dec 04, 2019 at 03:29:55AM -0800, James Salsman wrote:
> Thank you for your thoughtful reply. This might be much easier:
> 
> How about adding another example to
> https://www.postgresql.org/docs/11/planner-stats.html ?

Not sure I see the parallel here.  This page talks about planner
statistics, and yours about being able to find missing indexes because
of incorrect stats.

> SELECT relname, seq_scan-idx_scan AS too_much_seq,
>    case when seq_scan-idx_scan>0 THEN 'Missing Index?' ELSE 'OK' END,
>    pg_relation_size(relid::regclass) AS rel_size, seq_scan, idx_scan
> FROM pg_stat_all_tables
> WHERE schemaname='public' AND pg_relation_size(relid::regclass)>80000
> ORDER BY too_much_seq DESC;

Again.  this is a bit more complex than that.
--
Michael


Attachments:

  [application/pgp-signature] signature.asc (833B, 2-signature.asc)
  download

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]
  Subject: Re: monitoring-stats.html is too impenetrable
  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