Python Web Scraping ———08.04.2017

Commons tools for checking size, directory, and count rows

Just write down what I've learned about web data scraping so that I won't forget everything and start all over next time I need to use the technique.

How to check database size with query:

SELECT pg_size_pretty( pg_database_size('dbname') );   #replace dbname

How to check table size with query:

SELECT pg_size_pretty( pg_relation_size('tbname') );

How to check database directory:

show data_directory;  #need to be a superuser to have the access for directory

How to check row count in a table:

SELECT count(*) FROM tbl_APP_allStations;

Show maximum connections allowed:

SHOW max_connections;

Where to find config file:

SHOW config_file;

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 舞台效果极差! 要提升气质
    小白莲阅读 1,499评论 0 0
  • 我没见过世面,也不知道最漂亮的人应该是什么样。但我只知道,当我喜欢你的时候,你就如同天使,一举一动散发着光,美极了...
    澔澔阅读 1,639评论 0 1
  • 用眼神增强活力 好的思想观点,需要灵动的表达,才能展示见解的独特、语言的个性。眼睛作为“另一张嘴”,可以...
    禾呈女青阅读 2,241评论 0 0
  • 现在姜小码有这样一个需求,让王小码写一个方法判断一个学生该上什么学校。 王小码2分钟后就给出了代码: 姜小码很高兴...
    姜小码阅读 2,615评论 0 2

友情链接更多精彩内容