学习笔记(03):MySQL版SQL优化- MySQL启动问题、配置文件、编码问题

立即学习:https://edu.csdn.net/course/play/25283/297139?utm_source=blogtoedu

原理:

连接层 :提供与客户端连接的服务

服务层:1.提供各种用户使用的接口

     2.提供SQL优化器(MYSQL QUery Optimizer)

引擎层:提供了各种存储数据的方式(InnoDB  MyISAM)

存储层:存储数据

mysql 逻辑分层

 InnoDBL(默认):事务优先(适合高并发操作;行锁)

MyISAM:性能优先(表锁,锁的比较多)

查询数据库引擎:

支持哪些引擎      show  engines ;

查看当前使用的引擎   show  variables like '%strorage_engine%'  ;

指定数据库对象的引擎:

create  table tb(

            id int(4) auto_increment,

            name varchar(5),

            dept  varchar(5),

           primary key (id)

)ENGINE=MyISAM (指定引擎)AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ;

发布了15 篇原创文章 · 获赞 4 · 访问量 642

猜你喜欢

转载自blog.csdn.net/ankang_66/article/details/104299287
今日推荐