十一个高级MySql面试题


Posted in 面试题 onOctober 06, 2014
1. Explain MySQL architecture. – The front layer takes care of network connections and security authentications, the middle layer does the SQL query parsing, and then the query is handled off to the storage engine. A storage engine could be either a default one supplied with MySQL (MyISAM) or a commercial one supplied by a third-party vendor (ScaleDB, InnoDB, etc.)
2. Explain MySQL locks. – Table-level locks allow the user to lock the entire table, page-level locks allow locking of certain portions of the tables (those portions are referred to as tables), row-level locks are the most granular and allow locking of specific rows.

3. Explain multi-version concurrency control in MySQL. – Each row has two additional columns associated with it – creation time and deletion time, but instead of storing timestamps, MySQL stores version numbers.
4. What are MySQL transactions? – A set of instructions/queries that should be executed or rolled back as a single atomic unit.
5. What’s ACID? – Automicity – transactions are atomic and should be treated as one in case of rollback. Consistency – the database should be in consistent state between multiple states in transaction. Isolation – no other queries can access the data modified by a running transaction. Durability – system crashes should not lose the data.
6. Which storage engines support transactions in MySQL? – Berkeley DB and InnoDB.
7. How do you convert to a different table type? – ALTER TABLE customers TYPE = InnoDB
8. How do you index just the first four bytes of the column? – ALTER TABLE customers ADD INDEX (business_name(4))
9. What’s the difference between PRIMARY KEY and UNIQUE in MyISAM? – PRIMARY KEY cannot be null, so essentially PRIMARY KEY is equivalent to UNIQUE NOT NULL.
10. How do you prevent MySQL from caching a query? – SELECT SQL_NO_CACHE …
11. What’s the difference between query_cache_type 1 and 2? – The second one is on-demand and can be retrieved via SELECT SQL_CACHE … If you’re worried about the SQL portability to other servers, you can use SELECT /* SQL_CACHE */ id FROM … – MySQL will interpret the code inside comments, while other servers will ignore it.

Tags in this post...

面试题 相关文章推荐
在什么时候需要使用"常引用"
Dec 31 面试题
ORACLE第二个十问
Dec 14 面试题
什么是动态端口(Dynamic Ports)?动态端口的范围是多少?
Dec 12 面试题
别名指示符是什么
Oct 08 面试题
成都思必达公司C#程序员招聘面试题
Jun 26 面试题
软件测试工程师笔试题带答案
Mar 27 面试题
施惠特软件测试面试题以及笔试题
May 13 面试题
EJB的角色和三个对象
Dec 31 面试题
Ajax的优点和缺点
Nov 21 面试题
用Python写一个for循环的例子
Jul 19 面试题
JVM是一个编译程序还是解释程序
Sep 11 面试题
代码中finally中的代码会不会执行
Feb 06 面试题
遇到的Mysql的面试题
Jun 29 #面试题
一些关于MySql加速和优化的面试题
Jan 30 #面试题
MYSQL支持事务吗
Aug 09 #面试题
MYSQL基础面试题
May 13 #面试题
mysql有关权限的表都有哪几个
Apr 22 #面试题
介绍一下mysql的日期和时间函数
Mar 28 #面试题
介绍一下MYSQL常用的优化技巧
Oct 25 #面试题
You might like
C# Assembly类访问程序集信息
2009/06/13 PHP
让php处理图片变得简单 基于gb库的图片处理类附实例代码下载
2011/05/17 PHP
rephactor 优秀的PHP的重构工具
2011/06/09 PHP
php实现的pdo公共类定义与用法示例
2017/07/19 PHP
利用jquery的获取JS文件中的字符串内容
2012/02/14 Javascript
表单验证的完整应用案例探讨
2013/03/29 Javascript
Struts2的s:radio标签使用及用jquery添加change事件
2013/04/08 Javascript
JS操作CSS随机改变网页背景实现思路
2014/03/10 Javascript
原生JS绑定滑轮滚动事件兼容常见浏览器
2014/06/30 Javascript
Bootstrap每天必学之折叠
2016/04/12 Javascript
基于JavaScript实现添加到购物车效果附源码下载
2016/08/22 Javascript
基于LayUI分页和LayUI laypage分页的使用示例
2017/08/02 Javascript
laydate 显示结束时间不小于开始时间的实例
2017/08/11 Javascript
基于JavaScript实现新增内容滚动播放效果附完整代码
2017/08/24 Javascript
原生JS实现多个小球碰撞反弹效果示例
2018/01/31 Javascript
详解webpack编译速度提升之DllPlugin
2019/02/05 Javascript
小程序实现按下录音松开识别语音
2019/11/22 Javascript
vue 对axios get pust put delete封装的实例代码
2020/01/05 Javascript
[03:54]DOTA2英雄梦之声_第06期_昆卡
2014/06/23 DOTA
[03:09]2014DOTA2国际邀请赛 赛场上的美丽风景线 中国Coser也爱DOTA2
2014/07/20 DOTA
[57:47]Fnatic vs Winstrike 2018国际邀请赛小组赛BO2 第二场 8.18
2018/08/19 DOTA
Python中正则表达式的用法实例汇总
2014/08/18 Python
浅析Python中的多重继承
2015/04/28 Python
python实现备份目录的方法
2015/08/03 Python
python相似模块用例
2016/03/04 Python
Python参数类型以及常见的坑详解
2019/07/08 Python
文件上传服务器-jupyter 中python解压及压缩方式
2020/04/22 Python
python简单利用字典破解zip文件口令
2020/09/07 Python
Ralph Lauren法国官网:美国高品味时装品牌
2017/12/08 全球购物
Java中实现多态的机制是什么?
2014/12/07 面试题
C#实现对任一张表的数据进行增,删,改,查要求,运用Webservice,体现出三层架构
2014/07/11 面试题
个人承诺书格式
2014/06/03 职场文书
交通运输局四风问题对照检查材料思想汇报
2014/10/09 职场文书
本科毕业论文指导教师评语
2014/12/30 职场文书
创业计划书之宠物店
2019/09/19 职场文书
详解使用内网穿透工具Ngrok代理本地服务
2022/03/31 Servers