What is the reason for NOT indexing the Core Data property?

What is the reason that the Core Data property is indexed? From what I understand, searchable properties should be indexed if that helps performance. If so, why is not everything automatically indexed "internally"? Why should I enable / disable it for applicable properties and why not index the property? If it does not automatically apply to everything, there must be a reason. What could it be?

+6
source share
1 answer

Indexes are not free. Each additional index will slightly increase the size of the Core Data storage, and also make it linger a bit to save objects. Thus, if an index for a given property will never be used, or if it is rarely used so that the performance bonus from its indexing is not significant, performance (and storage usage) will actually be best without an index.

+6
source

Source: https://habr.com/ru/post/894506/


All Articles