What is a reason NOT to make a Core Data property indexed?
What is a reason NOT to make a Core Data property indexed? From what I understand, searchable properties are supposed to be indexed, if it helps performance. If so, why isn't everything automatically indexed "internally"? Why must I 开发者_运维技巧turn it on/off for applicable properties, and what is the reason not to index a property? If it's not automatically applied to everything, there must be a reason. What might that be?
Indexes aren't free. Each additional index will increase the size of the Core Data store somewhat, as well as making it take slightly longer to save entities. So, if an index on a given property will never be used, or if it's used rarely enough that the performance bonus from having it indexed isn't significant, performance (and storage usage) will actually be better overall without the index.
精彩评论