十一个高级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...

面试题 相关文章推荐
聚网科技C++面试笔试题
Sep 01 面试题
介绍一下SQL Server里面的索引视图
Jul 31 面试题
.net面试题
Sep 17 面试题
什么是WEB控件?使用WEB控件有哪些优势?
Jan 21 面试题
某公司的.net工程师面试题笔试题
Nov 22 面试题
什么是静态路由,其特点是什么?什么是动态路由,其特点是什么?
Jul 26 面试题
类和结构的区别
Aug 15 面试题
C#可否对内存进行直接的操作
Feb 26 面试题
Linux面试经常问的文件系统操作命令
Oct 04 面试题
软件工程师面试题
Jun 25 面试题
AJAX的全称是什么
Nov 06 面试题
Java中会存在内存泄漏吗,请简单描述
Dec 22 面试题
遇到的Mysql的面试题
Jun 29 #面试题
一些关于MySql加速和优化的面试题
Jan 30 #面试题
MYSQL支持事务吗
Aug 09 #面试题
MYSQL基础面试题
May 13 #面试题
mysql有关权限的表都有哪几个
Apr 22 #面试题
介绍一下mysql的日期和时间函数
Mar 28 #面试题
介绍一下MYSQL常用的优化技巧
Oct 25 #面试题
You might like
PHP中数组合并的两种方法及区别介绍
2012/09/14 PHP
计算php页面运行时间的函数介绍
2013/07/01 PHP
PHP编程风格规范分享
2014/01/15 PHP
利用php生成验证码
2017/02/23 PHP
jQuery 获取对象 根据属性、内容匹配, 还有表单元素匹配
2010/05/31 Javascript
Ext JS 4实现带week(星期)的日期选择控件(实战一)
2013/08/21 Javascript
基于 Docker 开发 NodeJS 应用
2014/07/30 NodeJs
JavaScript中setFullYear()方法的使用详解
2015/06/11 Javascript
jQuery中prepend()方法使用详解
2015/08/11 Javascript
浅谈node.js中async异步编程
2015/10/22 Javascript
js实现为a标签添加事件的方法(使用闭包循环)
2016/08/02 Javascript
JS实现含有中文字符串的友好截取功能分析
2017/03/13 Javascript
AngularJS中$http的交互问题
2017/03/29 Javascript
深入理解js 中async 函数的含义和用法
2018/05/13 Javascript
vue多个元素的样式选择器问题
2019/11/29 Javascript
Python解析最简单的验证码
2016/01/07 Python
Python通过命令开启http.server服务器的方法
2017/11/04 Python
python解决字符串倒序输出的问题
2018/06/25 Python
详解Python中的type和object
2018/08/15 Python
ubuntu 18.04搭建python环境(pycharm+anaconda)
2019/06/14 Python
python射线法判断检测点是否位于区域外接矩形内
2019/06/28 Python
Python 使用 environs 库定义环境变量的方法
2020/02/25 Python
美国现代家具和家居商店:Apt2B
2016/08/29 全球购物
捷克街头、运动和滑板一站式商店:BoardStar.cz
2019/10/06 全球购物
酒店副总岗位职责
2013/12/24 职场文书
中专药剂专业应届毕的自我评价
2013/12/27 职场文书
优秀体育委员自荐书
2014/01/31 职场文书
企业演讲稿范文大全
2014/05/20 职场文书
汽车技术服务与贸易专业求职信
2014/07/20 职场文书
副乡长民主生活会个人对照检查材料思想汇报
2014/10/01 职场文书
支部书记四风问题对照检查材料
2014/10/04 职场文书
党员转正意见怎么写
2015/06/03 职场文书
《狮子和鹿》教学反思
2016/02/16 职场文书
使用python向MongoDB插入时间字段的操作
2021/05/18 Python
Vue的过滤器你真了解吗
2022/02/24 Vue.js
go goth封装第三方认证库示例详解
2022/08/14 Golang