When should you store serialized objects in the database?

When should you store serialized objects in the database?
http://www.mysqlperformanceblog.com/2010/01/21/when-should-you-store-serialized-objects-in-the-database/


优点:
1.可以防止许多列为空

2.索引重建很容易

3.可以进行数据压缩

 

缺点:
1.搜索某一列更加困难

2.会取得serialized column的所有数据,相当于select *

3.不能使用聚集函数(min,max等)

4.不能加上表列的限制(如:是数字,必须在什么之间)

5.更新对象的某一个值,就需要对blob列进行更新

 

你可能感兴趣的:(When should you store serialized objects in the database?)