- 博客(19)
- 资源 (5)
- 收藏
- 关注
原创 innodb_trx、innodb_locks、innodb_lock_waits
os: centos 7.4db: mysql 5.7.28root@localhost 15:45:40 [test]> select * from information_schema.innodb_trx;Empty set (0.00 sec)root@localhost 15:55:03 [test]> select * from information_schema.innodb_locks;Empty set, 1 warning (0.00 sec)root@l
2020-08-31 16:00:26 610
原创 mysql 常用的一些工具
idedbeaversqlyognavicat备份恢复mysqldumpmydumperxtrabackup高可用mhamgrinnodb cluster
2020-08-26 14:33:31 204
原创 centos7 安装 oracle11g 弹窗不显示或者显示个横条
os: centos 7db: oracle 11g安装客户端的弹窗很小,有的时候还会只有一个竖条,需要添加 -jreLoc 命令安装。./runInstaller -jreLoc /etc/alternatives/jre_1.8.0
2020-08-23 19:51:08 2085 3
原创 mysql 8 数据库 with recursive 使用之一 初步使用
mysql 8 实现了 cte,并且实现了 with recursive ,很强大的功能。with recursive tmp(n) as ( select 1 union all select n+1 from tmp where 1=1 and n<=10)select * from tmp;+------+| n |+------+| 1 || 2 || 3 || 4 || 5 || 6 ||
2020-08-13 17:10:01 5052
原创 mysql 收集表的统计信息
mysql 收集表的统计信息比较个性查询 information_schema.tablesselect * from information_schema.TABLES tawhere 1=1 and ta.table_name = 'tmp_t0';show table statusshow table status like '%tmp_t0%';anlyze tableanalyze table tmp_t0;重启 mysql 实例...
2020-08-12 17:28:35 1104
原创 rhel、centos 一些人性化的变量
export PS1="\$USER@\`/bin/hostname -s\`-> " alias rm='rm -i' alias ll='ls -lh'
2020-08-10 16:34:05 140
原创 /dev/shm 调整大小
os: centos 7.4.1708/dev/shm 默认大小为物理内存的一半,如果需要调整大小,可以修改 /etc/fstab版本# cat /etc/centos-releaseCentOS Linux release 7.4.1708 (Core) /dev/shm# df -hTFilesystem Type Size Used Avail Use% Mounted ondevtmpfs devtmpfs 2
2020-08-10 15:50:36 3013
原创 mysql 数据库的 binlog 与 redo log 有什么区别,是如何配合保证数据安全?
首先,大的概念如下binlog 是 mysql server 层的日志redo log 是 innodb 引擎层的日志另外,如下为具体的不同之处第一 记录内容不同binlog 是逻辑日志,记录所有数据的改变信息,不仅只有 innodb 表相关的数据。redo log 是物理日志,记录所有inodb 表数据的变化。第二 记录内容的时间不同binlog 记录 commit 完毕之后的 dml、ddl 语句。redo log 记录事务发起之后的dml、ddl语句。第三 文件使用方式不同bin
2020-08-07 14:26:01 474 1
原创 postgresql 数据库表隐藏列 oid、tableoid、ctid、xmin、xmax、cmin、cmax
os: centos 7.4db: postgresql 10.11oid、tableoid、ctid、xmin、xmax、cmin、cmax 这些都是 postgresql 数据库表的隐藏列.起着不同的作用.版本# cat /etc/centos-releaseCentOS Linux release 7.4.1708 (Core) # # # yum list installed |grep -i postgresqlpostgresql10.x86_64
2020-08-06 16:11:26 2936
原创 pgroonga 处理中间模糊匹配 like ‘%xxoo%‘
pgroonga 处理中间模糊匹配 like ‘%xxoo%’os: centos 7.4.1708db: postgresql 10.11PGroonga is a PostgreSQL extension to use Groonga as index. PGroonga makes PostgreSQL fast full text search platform for all languages!PGroonga: https://github.com/pgroonga/pgroonga
2020-08-06 09:18:14 2522
原创 postgresql 数据库 json、jsonb 使用之一
os: centos 7.4.1708db: postgresql 10.11json 数据类型存储输入文本的精准拷贝,处理函数必须在每次执行时必须重新解析该数据。jsonb数据被存储在一种分解好的 二进制格式中,它在输入时要稍慢一些,因为需要做附加的转换。但是 jsonb在处理时要快很多,因为不需要解析。jsonb也支持索引。版本# cat /etc/centos-releaseCentOS Linux release 7.4.1708 (Core) # # # yum list i
2020-08-05 18:21:08 838
原创 postgresql 数据库常用的 json 函数
array_to_json()postgres=# select array_to_json('{{"a",1},{"b",2}}'::varchar[]); array_to_json ----------------------- [["a","1"],["b","2"]](1 row)row_to_json()postgres=# select row_to_json(row('a','1')); row_to_json -------------
2020-08-05 18:14:26 1834
原创 postgresql 的物化视图之一
os: centos 7.4.1708db: postgresql 10.11oracle 数据里经常用到物化视图,想不到 postgresql 9.3 也加入了这么先进的功能。版本# cat /etc/centos-releaseCentOS Linux release 7.4.1708 (Core) # # # yum list installed |grep -i postgresqlpostgresql10.x86_64 10.11-2PGDG.rh
2020-08-05 11:11:49 717
原创 pg_bigm 处理中间模糊匹配 like ‘%xxoo%‘
os: centos 7.4.1708db: postgresql 10.11pg_trgm 需要3个关键字才能使用到该索引,如果关键字只有1-2个或者更多,那就需要用到 pg_bigm。pg_bigm 可以理解为 pg_trgm PLUS。版本# cat /etc/centos-releaseCentOS Linux release 7.4.1708 (Core) # # # yum list installed |grep -i postgresqlpostgresql10.x86_
2020-08-04 11:34:57 1356
原创 mysql 数据库 单条记录,单个表,单个数据库的最大限制是多少
create table max_rows 的限制https://dev.mysql.com/doc/refman/8.0/en/innodb-limits.htmlhttps://dev.mysql.com/doc/refman/8.0/en/table-size-limit.htmlhttps://dev.mysql.com/doc/refman/8.0/en/column-count-limit.htmlhttps://dev.mysql.com/doc/refman/8.0/en/cr.
2020-08-03 19:38:36 651
原创 oracle 数据库 单条记录,单个表,单个数据库的最大限制是多少
What Is The Maximum Tablespace Size And Database Limit For An Oracle Database ? (Doc ID 1372905.1)What is the maximum value for the following in Oracle 10g and 11g :database sizetablespace sizefile sizesmall file databaseFor a small file database, th
2020-08-03 19:23:22 1334
原创 postgresql 数据库 单条记录,单个表,单个数据库的最大限制是多少
pg单条记录,单个表,单个数据库的最大限制是多少?下面是一些限制:单个数据库最大尺寸? 无限制(已存在有 32TB 的数据库)单个表的最大尺寸? 32 TB一行记录的最大尺寸? 400 GB一个字段的最大尺寸? 1 GB一个表里最大行数? 无限制一个表里最大列数? 250-1600 (与列类型有关)一个表里的最大索引数量? 无限制当然,实际上没有真正的无限制,还是要受系统可用磁盘空间、可用内存/交换区的制约。 事实上,当上述这些数值变得异常地大时,系统性能也会受很大影响。单表的最
2020-08-03 19:09:10 6676
原创 mysql 数据库 buffer、cache
buffer、cache 经常会混淆,其实还是有区别的。buffer: 缓冲修改过的数据(insert buffer)cache: 缓存读取的数据(page cache)
2020-08-03 08:31:33 474
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人