场景再现 我需要查询公司名称包含给定字符串的公司,于是我写了下面的测试小例子: var condition = "测试"; var query = from b in db.Companies where (condition == null || condition == "") ? true : b.Name.Contains(condition) orderby b.CompID select new { CompID = b.CompID, Name = b
空值跟null的区别.mysql官方: “NULL columns require additional space in the row to record whether their values are NULL. For MyISAM tables, each NULL column takes one bit extra, rounded up to the nearest byte.” Mysql难以优化引用可空列查询,它会使索引.索引统计和值更加复杂.可空列需要更多的存储空间(见上