合集-mysql 学习笔记
摘要:索引的本质 B-Tree结构 B+Tree结构 Hash结构 MyISAM存储引擎索引实现 innodb存储引擎实现 innodb引擎生成两个文件,将索引文件和数据文件都放在的.ibd文件下(这就是聚集索引) myisam引擎生成三个文件,将索引和数据分开保存分别在 .MYD .MYI 文件下(这就
阅读全文
摘要:创建表数据: #创建actor表 DROP TABLE IF EXISTS `actor`; CREATE TABLE `actor` ( `id` int(11) NOT NULL, `name` varchar(45) DEFAULT NULL, `update_time` datetime D
阅读全文
摘要:测试建表 CREATE TABLE `employees` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(24) NOT NULL DEFAULT '' COMMENT '姓名', `age` int(11) NOT NULL DEFA
阅读全文
摘要:使用上一篇的表并插入测试数据 #‐‐ 插入一些示例数据 drop procedure if exists insert_emp; delimiter ;; create procedure insert_emp() begin declare i int; set i=1; while(i<=100
阅读全文
摘要:-- 示例表: CREATE TABLE `t1` ( `id` int(11) NOT NULL AUTO_INCREMENT, `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `idx_a`
阅读全文