https://dev.mysql.com/doc/refman/8.0/en/mysql-acid.html The ACID model is a set of database design principles that emphasize aspects of reliability that are important for business data and mission-critical applications. A: atomicity.原子性 Transactions are atomic units of work that
一、InnoDB On-Disk Structures https://dev.mysql.com/doc/refman/8.0/en/innodb-on-disk-structures.html 二、 表 Tables 三、 Indexes 索引 四、 Doublewrite Buffer 五、 Redo log 六、 Undo log
MySQL8 零、 MySQL数据文件 1. InnoDB 的存储文件有两个,一个 `.frm`表定义文件 和 一个 `.idb`数据文件。 2. 数据库采用数据页的形式组织数据。MySQL默认的非压缩数据页为16KB。 在.idb文件中,0-16KB偏移量即为0号数据页,16-23KB为1号数据页,依次类推。 一、 InnoDB Architecture https://dev.mysql.com/doc/refman/8.0/en/innodb-architecture.html in-memory and on-disk structures t
怎么1s内从数十亿中找出top10? 入库时统计 数据不太变更或者变更不影响统计量,数据量特别大时尽量用这个---- 实时统计 数据变更比较频繁,数据量特别大时尽量加上缓存以降低数据库负荷 定时统计 //暂时还没有遇到适用的场景。。
插入查找等方面的性能如何分析 explain如何用 还有Query Profiler 执行时间分析,执行情况分析 1.profiling 是否开启:select @@profiling; show variables like '%profiling$';//是否支持及是否开启 开启:set profiling=1 查看开启后的sql执行时间:show profiles; 查看某个执行id的详细:show profile for query {queryId}; //这个show展示的所有信息都是从表INFORMATION_SCHEMA.PROFILIN
--数字相关 floor(123.12) //返回一个小于这个数的最大 整数 rand() //产生一个【0,1)之间的小数 date_format(date,"%Y-%m-%d") --字符串相关 concat(s1,s2,s3,s4.....)//任意一个为null则整个为null charlength(str)//返回字符串str的长度 left(str,n); right(str,n);//截取字符串str的n个字符 substring(str,起始位置1开始,截取长度可选); lower(str)和lcase(str)//将所有字母转换为小写