Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnQPy-0002cq-B4 for pgsql-admin@arkaria.postgresql.org; Fri, 23 Sep 2016 13:21:30 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bnQPx-00034C-SR for pgsql-admin@arkaria.postgresql.org; Fri, 23 Sep 2016 13:21:29 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bnQPw-0002zk-Qi for pgsql-admin@postgresql.org; Fri, 23 Sep 2016 13:21:29 +0000 Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bnQPu-00078t-9o for pgsql-admin@postgresql.org; Fri, 23 Sep 2016 13:21:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20140207; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=BRQ2V7Ox8K9ZC8WfueynwUN89MG8aKvrjQjbiFqRSeQ=; b=YnGRap72o23p83C5Zm3xen3fQw J8mSGvXr4S8yGvW6SsP/aJTokoq6erVo6pwW46xMI2ZB7we9lcVFejS3JlmxiJtqBtaNFG21EioNd /1N0eteiSEXLgRRGFvGbrbeVP; Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.87) (envelope-from ) id 1bnQPr-0004Ei-3h; Fri, 23 Sep 2016 15:21:23 +0200 Date: Fri, 23 Sep 2016 15:21:23 +0200 From: hubert depesz lubaczewski To: Artem Tomyuk Cc: pgsql-admin@postgresql.org Subject: Re: Finding the size of your biggest relations Message-ID: <20160923132122.jcpbobqzf3x4emda@depesz.com> Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20160910 (1.7.0) X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org 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