07 2022 档案

摘要:大部分DBA同学,业务正式上线前,会根据业务使用场景,进行sysbench或TPC-C压力测试。一、TPC-C侧重于OLTPTPC-C是业界常用的一套Benchmark,由TPC委员会制定发布,用于评测数据库的联机交易处理(偏向OLTP能力)。主要涉及10张表,包含了NewOrder(新订单的生成) 阅读全文
posted @ 2022-07-28 18:39 青空如璃 阅读(1046) 评论(0) 推荐(0) 编辑
摘要:这张表4400条,一般select * from xxx 在mysql8.0和polardb上非常快,在OB上300多秒都没有出来 反馈给OB官方,因为我们采用的是云企业版测试,select /*+parallel(32)*/ * from xxx 并行查询一样。。。。。 等官方进一步解释。。。。。 阅读全文
posted @ 2022-07-25 18:13 青空如璃 阅读(410) 评论(0) 推荐(0) 编辑
摘要:/etc/vim/vimrc.tiny 添加以下两行 " Vim configuration file, in effect when invoked as "vi". The aim of this" configuration file is to provide a Vim environme 阅读全文
posted @ 2022-07-23 13:47 青空如璃 阅读(106) 评论(0) 推荐(0) 编辑
摘要:使用网上的方法 dba@mklmi:~$ sudo su - postgres[sudo] password for dba: su: warning: cannot change directory to /home/postgres: No such file or directory$ ls 阅读全文
posted @ 2022-07-23 11:13 青空如璃 阅读(132) 评论(0) 推荐(0) 编辑
摘要:可以参考https://www.modb.pro/db/331381 pg_toast_2619这个表是pg_statistic系统表的toast扩展表,如果PG报错如下: ERROR: unexpected chunk number 1 (expected 0) for toast value 1 阅读全文
posted @ 2022-07-22 16:26 青空如璃 阅读(430) 评论(0) 推荐(0) 编辑
摘要:checking for library containing readline... noconfigure: error: readline library not foundIf you have readline already installed, see config.log for d 阅读全文
posted @ 2022-07-21 16:31 青空如璃 阅读(144) 评论(0) 推荐(0) 编辑
摘要:oceanbase 分布式 压力测试 阅读全文
posted @ 2022-07-20 18:18 青空如璃 阅读(163) 评论(0) 推荐(0) 编辑
摘要:mydb=# select * from car; id | name + 1 | aa 2 | bb 3 | cc 4 | ddd(4 rows)Time: 0.592 msmydb=# select *,ctid,xmin,xmax from car; id | name | ctid | xm 阅读全文
posted @ 2022-07-20 13:57 青空如璃 阅读(36) 评论(0) 推荐(0) 编辑
摘要:最近准备上EC平台项目,因为是To C端,按目前的第天40-60W笔/天订单,原来的PolarDB-MySQL 相关收费太坑人了,计算节点费用、备份费、存储费。。。。一大堆费,购买资源存储包,超过又收费。。。天天忙于这些事,有点头疼...... 最近和OB销售申请,在我的个人账号上开了一个临时OB 阅读全文
posted @ 2022-07-20 09:59 青空如璃 阅读(266) 评论(0) 推荐(0) 编辑
摘要:Session A:mydb=# select * from car; id | name + 1 | aa 2 | bb(2 rows)Time: 0.264 msmydb=# begin;BEGINTime: 0.069 msmydb=*# delete from car;DELETE 2Tim 阅读全文
posted @ 2022-07-18 14:21 青空如璃 阅读(117) 评论(0) 推荐(0) 编辑
摘要:postgres=# drop database oms_info;ERROR: database "oms_info" is being accessed by other usersDETAIL: There are 2 other sessions using the database. 上述 阅读全文
posted @ 2022-07-08 18:23 青空如璃 阅读(349) 评论(0) 推荐(0) 编辑
摘要:我们使用psql,基本使用\d \dv \ds \l.....等命令查询,下面介绍常用的特例[postgres@dba01 ~]$ psql -hlocalhost -p1921 psql (14.3)Type "help" for help.postgres=# \c mydb;You are n 阅读全文
posted @ 2022-07-04 11:13 青空如璃 阅读(578) 评论(0) 推荐(0) 编辑
摘要:不想登录QQ和钉钉等软件截图 (1)用txt打开,输入start snippingtool,并保存为cut.bat(bat格式)。 (2)双击桌面cut.bat,显示如下图,就可以随意截图了。 阅读全文
posted @ 2022-07-01 18:25 青空如璃 阅读(5810) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-07-01 17:08 青空如璃 阅读(252) 评论(0) 推荐(0) 编辑
摘要:一、全表扫描(Seq Scan) 当数据表中没有索引,或者满足条件的数据集较大,索引扫描的成本高于全表扫描,这时规划器会选择使用全表扫描。 二、索引扫描(index scan) 查询列时有索引,则直接扫描索引,不再进行全表扫描,耗费时间小于顺序扫描。 多了筛选条件后,会打开每条记录,进行筛选记录,花 阅读全文
posted @ 2022-07-01 16:45 青空如璃 阅读(2708) 评论(0) 推荐(0) 编辑
摘要:一、背景: 今天BI给我说今天生产中的数据库查询都很慢,我叫他发SQL过来 select a.* from du_order_md5 aleft join order_info_05 b on a.tid = b.tid where b.tid is null a表139378条数据 b表14883 阅读全文
posted @ 2022-07-01 15:39 青空如璃 阅读(25) 评论(0) 推荐(0) 编辑
摘要:我们经常执行SQL时,在SQL前加explain加以分析他的执行计划,这个cost不是时间概念,只是评估执行一个SQL的执行代价: pg_tables=# explain select count(*) from cn_ods_tables_2022.order_info_05;QUERY PLAN 阅读全文
posted @ 2022-07-01 13:40 青空如璃 阅读(382) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示