摘要: create table create table test( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(32) NOT NULL, age int , PRIMARY KEY ( id ) ); insert script drop procedu 阅读全文
posted @ 2020-05-30 16:17 tmortred 阅读(236) 评论(0) 推荐(0) 编辑
摘要: Misc /* Resize */ for (j = 0; j < dbs_per_call; j++) { tryResizeHashTables(resize_db % server.dbnum); resize_db++; } /* Rehash */ if (server.activereh 阅读全文
posted @ 2020-05-26 23:37 tmortred 阅读(155) 评论(0) 推荐(0) 编辑
摘要: Intro RR 隔离级别 `For a unique index with a unique search condition, InnoDB locks only the index record found, not the gap before it. For other search co 阅读全文
posted @ 2020-05-18 21:35 tmortred 阅读(150) 评论(1) 推荐(0) 编辑
摘要: 为什么需要垂直拆分 为了提升数据库性能,可以考虑将 blob 和 text 拆分到单独的表中去 垂直拆分为什么可以提升性能 将 blob, text 这些大字段拆分出去后。mysql 底层存储单页可以存储更多 row 记录(其实也多不了多少, 因为 blob 和 text 字段可能只有前 20 个字 阅读全文
posted @ 2020-05-11 22:42 tmortred 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 8.4.4 Internal Temporary Table Use in MySQL In some cases, the server creates internal temporary tables while processing statements. Users have no dir 阅读全文
posted @ 2020-05-07 21:06 tmortred 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 原文来自 https://blog.csdn.net/qq_27529917/article/details/87904179 先构建本篇博客的案列演示表: create table a(a1 int primary key, a2 int ,index(a2)); 双字段都有索引 create t 阅读全文
posted @ 2020-04-20 21:11 tmortred 阅读(255) 评论(1) 推荐(0) 编辑
摘要: 【转】cuck hash https://coolshell.cn/articles/17225.html (感谢网友 @我的上铺叫路遥 投稿) 对于海量数据处理业务,我们通常需要一个索引数据结构,用来帮助查询,快速判断数据记录是否存在,这种数据结构通常又叫过滤器(filter)。考虑这样一个场景, 阅读全文
posted @ 2020-04-07 20:37 tmortred 阅读(521) 评论(1) 推荐(0) 编辑
摘要: 就是说你有一组函数H包含|H|个函数,把所有的关键字散列成0~m 1的哈希值。我们把H设计成有这样一个性质:对于所有的不相等关键字x和y,使x和y的散列值相等的函数h的个数等于|H|/m 那么,在不知道选择了哪个函数时,两个不相等的关键字x和y会有相同的哈希值的概率可以计算出来:在最开始时随机选一个 阅读全文
posted @ 2020-04-02 21:07 tmortred 阅读(177) 评论(1) 推荐(0) 编辑
摘要: 【转】原作来自 https://www.cnblogs.com/z941030/p/9218356.html 算法背景 如果想判断一个元素是不是在一个集合里,一般想到的是将集合中所有元素保存起来,然后通过比较确定。链表、树、散列表(又叫哈希表,Hash table)等等数据结构都是这种思路,存储位置 阅读全文
posted @ 2020-04-01 21:39 tmortred 阅读(133) 评论(1) 推荐(0) 编辑
摘要: 【转】http://blog.csdn.net/pipisorry/article/details/62443757 BitMapBitMap从字面的意思,很多人认为是位图,其实准确的来说,翻译成基于位的映射。 在所有具有性能优化的数据结构中,大家使用最多的就是hash表,是的,在具有定位查找上具有 阅读全文
posted @ 2020-04-01 21:30 tmortred 阅读(211) 评论(1) 推荐(0) 编辑