2018年11月27日
流计算数据库产品 pipelineDB * 推荐数据库产品 recDB 时序数据库 timescaleDB * 分布式数据库插件 citus * 列存储插件 IMCS, cstore等 面向OLAP的codegen数据库 pg_LLVM 向量计算插件 vops 数据库性能分析 pg_stat_statements pg_buffercache 直接访问数据库文件系统 adminpack 加密数据 pgcrypto 预热缓存 pg_prewarm 检查存储,特别是表膨胀 pgstattuple 模糊搜索 pg_trgm 连接到远程服务器 postgres_fdw k近邻(KNN)搜索……
阅读全文
2018年11月27日
单词表 utilizes 利用 degradation 退化,降级 hypertable 元数据表 monotonically 单调的 monotonically increase: 单调递增 solely 单独地,唯一地 cardinality 基数 excel 优于,擅长 eliminate 干掉,排除 refine 精致的,经过改良的 distilled 从..中萃取 robust 精力充沛的 fundamental 基础的 主要的 trademark 商标 affilicate 隶属 reference 参考 constant development 持续发展 convention 约定, 习惯 collateral n. 抵押物; 担保品;i mandatory 强制的 simulation 模拟 irrespective 不用关心的 optimally 最优 from scratch 从零开始……
阅读全文
2018年11月27日
性能参数 pgtune pgconfig cybertec 日志参数 更多参数详解 管理 listen_addresses = "*" # 连接访问控制,哪些ip可以访问, * 全部。 结合pg_hba.conf , iptables设置。 superuser_reserved_connections = 3 # 预留给超级管理员的连接数。 port = 5432 # 默认访问端口 wal_keep_segments = 1024 # wal 日志保存数量 wal日志 wal_log_hints = on full_page_writes = on 成本因子 # - Planner Cost Constants - #seq_page_cost = 1.0 # measured on an arbitrary scale 顺序扫描……
阅读全文
2018年11月26日
介绍 LSM-Tree,全称为 log-structured merge-tree,是为了满足日益增长的数据量所带来的高效写性能的需求而提出的设计。考虑到磁盘随机写和顺序写上千倍的性能差距,传统的Btree 结构设计采取的分散的 update-in-place 策略在数据量庞大、写缓存作用有限的情况下,存在大批量的随机写操作,使得写性能完全满足……
阅读全文
2018年11月26日
blance roundrobin # 轮询,软负载均衡基本都具备这种算法 balance static-rr # 根据权重,不支持慢启动 。建议使用 balance leastconn # 最少连接者先处理,建议使用 balance source # 根据请求源IP,建议使用 balance uri # 根据请求的URI balance url_param,# 根据请求的URl参数’balance url_param' requires an URL parameter name balance hdr(name) # 根据HTTP请求头来锁定每一……
阅读全文
2018年11月21日
Prometheus Alertmanager 概述 Alertmanager与Prometheus是相互分离的两个组件。Prometheus服务器根据报警规则将警报发送给Alertmanager,然后Alertmanager将silencing、inhibition、aggregation等消息通过电子邮件、PaperDu……
阅读全文
2018年11月21日
数据模型(Data Model) 由指标名称(metric)和一个或一组标签(lable)集合以及float64类型的值组成。 例如 up{instance="10.1.88.71:9115",job="blackbox_exporter_10.1.88.74_icmp"} 1 metric类型 client libraries提供了四种metric类型,包括Counter、Gauge、Histogram、Summary。 Counter 计数器,只允许增加或重置为……
阅读全文
2018年11月21日
一条sql的执行过程 将 SQL 解析成抽象语法树(AST),将 AST 变换到内部表示(IR)。然后优化器的输入就是 IR,它将生成最优的查询计划(Plan),然后会变成具体的执行器(Executor),里面有许多的算。 优化的阶段为IR 到生成 Plan 的过程,包括逻辑优化和物理优化 逻辑优化 逻辑优化主要是基……
阅读全文
2018年11月19日
用途 优点 主键唯一约束 加速检索 排序 缺点 更新数据时需要同时维护对应索引 占用磁盘空间,甚至比表数据本身还要多 使用场景利弊分析 TP与AP应用 读写使用比例 点查询批量查询 创建索引 \h create index 命令: CREATE INDEX 描述: 建立新的索引 语法: CREATE [ UNIQUE ] INDEX [ CONCURRENTLY ] [ [ IF NOT EXISTS ] 名称 ] ON 表名 [ USING 方法 ] ( { 列名称 | ( 表达式 ) }……
阅读全文
2018年11月16日
下载安装 1.0.15 sysbench官网 curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash sudo yum -y install sysbench 参数说明 sysbench --help Usage: sysbench [options]... [testname] [command] Commands implemented by most tests: prepare run cleanup help General options: --threads=N number of threads to use [1] 线程数 --events=N limit for total number of events [0] 事务数 --time=N limit for total execution time in seconds [10] 测压时间 --forced-shutdown=STRING number of seconds to wait after the --time limit before forcing shutdown, or 'off' to disable [off] --thread-stack-size=SIZE size of stack per thread [64K] --rate=N average transactions rate. 0 for unlimited rate [0] --report-interval=N periodically report intermediate statistics with a specified interval in seconds. 0 disables intermediate reports [0] --report-checkpoints=[LIST,...] dump full statistics and reset all counters……
阅读全文