十一个高级MySql笔试题
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.
-
2016考研新闻传播学复习考点:外国新闻传播史
以下是本站为大家整理好的有关考研的资料,希望对大家有所帮助,如有疑问请关注本站!一、古代新闻传播发展的三个里程碑及其意义:(一)语言的产生是传播史上第一个重要的里程碑。1、应付大自然的威胁能力增强和共同劳动2、人类思维能力加强3、加快了人们信息交流的传...
-
2016考研时间无法充值:8个问题要及时解决
考研成绩要想好,行为习惯少不了。观察这几年的考研成绩,我们会发现,一个考研成绩好的学生,他/她为考研所采取的行为和习惯是最终让他/她取得好成绩的重要因素。印度谚语说:播种一种行为,收获一种习惯;播种一种习惯,收获一种性格;播种一种性格,收获一种命运。既然选...
-
报考指南:选择目标院校应以适合为主
以执着的坚守和艰辛的付出来应对考研路上的挫折,既然选择了放足远方,便无悔风雨兼程。而毅力的大部分来自于目标,目标的形成又多来自自身的性格。好的开始就是成功的一半,对已考研人也是一样的,明确考研的目标,你才算是真正的踏上了考研路。其中目标院校和专业尤其重...
-
安徽师范大学2016年考研世界史真题
2017考研已经悄然到来了,考生们也在积极寻找考研真题了。下面是小编为大家整理收集的关于安徽师范大学2016年考研世界史真题的相关内容,欢迎大家的阅读。名词解释:乌鲁卡基那改革,梭伦改革,希罗多德,尼西亚会议,末日审判书,拿破仑法典,加富尔,全国工业复兴法史料分析题:(...