随笔分类 -  postgres

摘要:1. psql --helppsql is the PostgreSQL interactive terminal.Usage: psql [OPTION]... [DBNAME [USERNAME]]General options: -c, --command=COMMAND run o... 阅读全文
posted @ 2015-06-05 11:33 段星星 阅读(355) 评论(0) 推荐(0)
摘要:查看占用CPU最多的几个postgresqlps aux | grep postgres | sort -n -r -k 3 | head -10 | awk '{print $2, $3}'查看所有postgre语句执行时间:select procpid, start, now() - start... 阅读全文
posted @ 2015-05-14 15:57 段星星 阅读(1391) 评论(1) 推荐(0)
摘要:一.连接数据库/opt/pg93/bin/psql -h Host -p port -d database -U user二.查看数据库的大小my_db=# select pg_size_pretty(pg_database_size('log_analysis')); pg_size_pretty... 阅读全文
posted @ 2015-05-13 11:15 段星星 阅读(350) 评论(1) 推荐(0)