Обсуждение: 答复: [GENERAL] Need Help
Maybe U can't get the disk usage info, but you can try command "explain" -----邮件原件----- 发件人: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] 代表 JM 发送时间: 2006年12月28日 10:43 MARK 收件人: pgsql-general@postgresql.org 抄送: Pgsql-Performance (E-mail) 主题: [GENERAL] Need Help how can i get the disk usage for each table? can i do it via SQL? Thanks, Mailing-Lists ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org/
This should help you get the disk usage for a table:
select pg_size_pretty(pg_relation_size('tablename'));
---------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com )
select pg_size_pretty(pg_relation_size('tablename'));
---------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com )
On 12/28/06, 马庆 <ma.qing@staples.sh.cn> wrote:
Maybe U can't get the disk usage info, but you can try command "explain"
-----邮件原件-----
发件人: pgsql-general-owner@postgresql.org [mailto: pgsql-general-owner@postgresql.org] 代表 JM
发送时间: 2006年12月28日 10:43 MARK
收件人: pgsql-general@postgresql.org
抄送: Pgsql-Performance (E-mail)
主题: [GENERAL] Need Help
how can i get the disk usage for each table? can i do it via SQL?
Thanks,
Mailing-Lists
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 What about empty space freed up by VACUUM? On 12/28/06 03:11, Shoaib Mir wrote: > This should help you get the disk usage for a table: > > select pg_size_pretty(pg_relation_size('tablename')); - -- Ron Johnson, Jr. Jefferson LA USA Is "common sense" really valid? For example, it is "common sense" to white-power racists that whites are superior to blacks, and that those with brown skins are mud people. However, that "common sense" is obviously wrong. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFk8VIS9HxQb37XmcRAsaMAJ9pznXfdZ0YB2pZD7V6dC2H3yp6ogCgxiET ekRWyRU39ZRC6Y6hpGqpL6w= =bBml -----END PGP SIGNATURE-----