天堂

  :: :: 博问 :: 闪存 :: :: :: 订阅 订阅 :: 管理 ::

2012年9月27日

摘要: 今天在review 一个SQL的时候,发现即使在列前面有函数操作,查询也能够使用到索引,如下:(OLD)1 mysql> desc SELECT sql_no_cache COUNT(1) FROM Appointment WHERE YEAR(ScheduledDate)=YEAR(NOW()) AND MONTH(ScheduledDate)=MONTH(NOW()); +----+-------------+-------------+-------+---------------+---------------+---------+------+---------+------- 阅读全文
posted @ 2012-09-27 17:24 zuoxingyu 阅读(1412) 评论(1) 推荐(1) 编辑

摘要: 原文链接:http://www.mysqlperformanceblog.com/2012/03/27/innodbs-gap-locks/One of the most important features of InnoDB is the row level locking. This feature provides better concurrency under heavy write load but needs additional precautions to avoid phantom reads and to get a consistent Statement based 阅读全文
posted @ 2012-09-27 11:14 zuoxingyu 阅读(2876) 评论(0) 推荐(3) 编辑