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;

你可能感兴趣的:(Python Web Scraping ———08.04.2017)