What does the Indexed Property of a CoreData attribute do?

前端 未结 2 1331
旧巷少年郎
旧巷少年郎 2020-12-15 02:56

I have a Core data model with a 32bit hash value. I need to look up specific hash values quickly. Should I use the indexed property? I have no idea what it does and the d

2条回答
  •  自闭症患者
    2020-12-15 03:26

    If you check the box, Core Data will build an index of the values, which will make searching faster and more efficient. It's like what Spotlight uses. Without the index it'll have to travel through the database every time. You say you need to look up the values quickly—then you should index them.

提交回复
热议问题