pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Artem Tomyuk <admin@leboutique.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Finding the size of your biggest relations
Date: Fri, 23 Sep 2016 15:21:23 +0200
Message-ID: <20160923132122.jcpbobqzf3x4emda@depesz.com> (raw)
In-Reply-To: <CANYYVqJrOSYCaryawYt95f-hQR6FHjMAk7CZ6eycb5i=GSu-Zg@mail.gmail.com>
References: <CANYYVqJrOSYCaryawYt95f-hQR6FHjMAk7CZ6eycb5i=GSu-Zg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>

On Fri, Sep 23, 2016 at 03:57:52PM +0300, Artem Tomyuk wrote:
> i am running this query to get to 20 biggest tables but getting only
> pg_temp** records like this without size:

What query did you run?

For finding largest tables, I use:

select oid::regclass, pg_table_size(oid) from pg_class where relkind
= 'r' order by 2 desc limit 20;

Best regards,

depesz



-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



view thread (4+ messages)  latest in thread

Message-ID: <20160923132122.jcpbobqzf3x4emda@depesz.com>
Permalink:  ../20160923132122.jcpbobqzf3x4emda@depesz.com/
Also on:    postgresql.org/message-id/20160923132122.jcpbobqzf3x4emda@depesz.com

 · 

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: pgsql-admin@postgresql.org
  Cc: depesz@depesz.com, admin@leboutique.com
  Subject: Re: Finding the size of your biggest relations
  In-Reply-To: <20160923132122.jcpbobqzf3x4emda@depesz.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox