Postgres DB大小命令 [英] Postgres DB Size Command
问题描述
在Postgres中是否有找到所有数据库大小的命令?
Is there any command to find all the databases size in Postgres?
我可以使用以下命令找到特定数据库的大小:
I am able to find the size of a specific database by using following command:
select pg_database_size('databaseName');
推荐答案
还有...如果万一您不想要输入整个查询...
,您还可以输入...
And... If in case you may not want to type a whole query... you can also type...
\l+ <database_name>
,您将获得有关数据库的一些详细信息,
包括数据库的大小。
and you will get some details about the database, including the size of the database.
然后...获取所有数据库的大小。
And... To get sizes of all databases.
您只需键入...
you can just type...
\l+
您可能需要进入postgresql命令提示符,以使用这些postgresql帮助程序命令查询
。
You may need to go into the postgresql command prompt to query with these postgresql helper commands.
通过键入检查其他postgresql帮助程序命令。 p>
Check other postgresql helper commands by typing
\?
在postgresql命令提示符下。
at the postgresql command prompt.
这篇关于Postgres DB大小命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!