原创 arangodb的graph之一

A Graph consists of vertices and edges. graph分爲named graphs,anonymous graphs AQL Graph Operations 包含兩種: AQL Travers

原创 centos7 配置iptables

yum install iptables-services firewalld和iptables衝突,需要禁用firewalld systemctl stop firewalld systemctl disable firewalld

原创 docker安裝

docker在centos 7 的安裝 yum install yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo

原创 mysql的多源複製

mysql 5.7 的multi-source replication mysql複製分爲基於binlog位置的複製和基於gtid的複製 默認mysql會創建一個名爲 ‘’ 的channel 當開啓multi-source rep

原创 pgsql監控

1,查看進程 pgsql以多進程方式運行 ps -ef|grep postgres 2,查看進程活動情況 select * from pg_stat_activity; select * from pg_stat_bgwrite

原创 pgsql的高可用

pgsql的高可用 1,共享磁盤 主機故障,備機mount磁盤,提供服務 2,主從模式 主庫傳送archvelog 至從庫,從庫處於standby 3,第三方軟件

原创 pgsql數據備份和恢復

pgsql數據備份和恢復: 1,sql dump pg_dump dbname > dumpfile 恢復 psql dbname < dumpfile 備份db cluster pg_dumpall > dumpfile 恢復 p

原创 mysql的性能調優

mysql的性能調優分爲以下幾個部分: 1,sql 調優 2,index調優 3,庫表結構調優 file_format: antelope ,barracuda row_format:redundant,compact,dynamic

原创 mysql監控之performance_schema

mysql中,perfomance_schma包含以下信息: users threads mutex_instances rwlock_instances events_waits_current Performance Schema

原创 mysql監控之show

mysql監控 1,show status 2,show master status 3,show slave satus\G 4,show plugins; 5,show databases; 6.show tables; 7,sh

原创 pgsql術語

1,database cluster: database cluster is a collection of databases 2, Shared Memory and Semaphores sysctl -w kernel.sh

原创 python中用list實現queue

python中用list實現queue class myqueue(): def push(self,a): if self.count>=self.maxsize: print('The queue ha

原创 python中判斷質數

pyhton中判斷質數 def isprime(a): if isinstance(a,int)==False: return False if a<=1: return False if a==2:

原创 pgsql配置簡介

pgsql的配置文件 1,postgresql.conf (控制數據庫運行) data_directory = hba_file = listen_addresses = port = max_connections = shared

原创 pgsql客戶端psql簡介

psql使用: psql -hserver01 -p5432 [DBNAME [USERNAME]] ? show help \q quit \l list databases \d list ta