In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
-- View database size without calculating index select pg_size_pretty (pg_database_size ('mydb'));-- View database size, including index select pg_size_pretty (pg_total_size (' mydb'));-- View index size in table select pg_size_pretty (pg_indexes_size ('test_1'));-- View table size, excluding index select pg_size_pretty (index (' test_1')) -- or\ dt+ test_1-- to view the table size, including index select pg_size_pretty (pg_total_relation_size ('test_1'));-- to view a schema size, including the index. Does not include the index available pg_relation_sizeselect schemaname,round (sum (pg_total_relation_size (schemaname | |'. | tablename)) / 1024) "Mb" from pg_tables where schemaname='mysch' group by 1-View the tablespace size select pg_size_pretty (pg_tablespace_size ('pg_global'));-View the data file select pg_relation_filepath (' test_1') corresponding to the table -- switch log log file to the next select pg_rotate_logfile ();-- switch log select pg_switch_xlog (); checkpoint
Function name return type description pg_column_size (any) int the number of bytes required to store a specified numeric value (possibly compressed) pg_database_size (oid) bigint specified disk space used by OID database (name) bigint specified name database used disk space pg_indexes_size (regclass) bigint association specified table OID or table name table index use total disk space pg_relation_size (relation regclass Fork text) bigint specifies the table or index of the OID or name By specifying the disk space pg_relation_size (relation regclass) bigintpg_relation_size (...) used by fork ('main',' fsm' or 'vm'). The acronym pg_size_pretty (bigint) textConverts a size in bytes expressed as a 64-bit integer into a human-readable format with size unitspg_size_pretty (numeric) text converts values in bytes into a human readable unit of size pg_table_size (regclass) bigint specifies the disk space used by the table OID or table name Excluding indexes (but including TOAST, free space mapping and visual mapping) pg_tablespace_size (oid) bigint specified disk space used by tablespaces of OID (name) bigint specified names of tablespaces used pg_total_relation_size (regclass) bigint specifies the total disk space used by table OID or table names, including all index and TOAST data
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.