整理文档
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
```
|
||||
```postgresql
|
||||
SELECT locker.pid,
|
||||
pc.relname,
|
||||
locker.mode,
|
||||
@ -27,12 +27,18 @@ SELECT pg_terminate_backend(14448)
|
||||
|
||||
|
||||
|
||||
```
|
||||
playboy=> select pg_size_pretty(pg_total_relation_size('test')); //查看表的总大小,包括索引大小
|
||||
pg_size_pretty
|
||||
```postgresql
|
||||
-- 查看表的总大小,包括索引大小
|
||||
select pg_size_pretty(pg_total_relation_size('test'));
|
||||
|
||||
playboy=> select pg_size_pretty(pg_relation_size('test')); //以KB,MB,GB的方式来查看表大小
|
||||
pg_size_pretty
|
||||
-- 以KB,MB,GB的方式来查看表大小
|
||||
select pg_size_pretty(pg_relation_size('test'));
|
||||
|
||||
-- 查看最大连接数
|
||||
show max_connections;
|
||||
|
||||
-- 查看当前连接数
|
||||
SELECT COUNT(*) from pg_stat_activity;
|
||||
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user