iPhone 。索引属性
在核心数据实体上打开属性的索引属性有哪些优点或缺点?
我有一个包含大约 300 个项目的数据库。每个项目都有 4 种语言的描述。描述长度约为40个字符,一般较少。我在其他实体上还有 4 个附加属性,这些属性也是用四种语言进行描述的,长度也少于 40 个字符。
这8个属性都需要转索引吗?有什么优点或缺点吗?
谢谢
What are the advantages or disadvantages of turning ON the index property of an attribute on a core data entity?
I have a database with about 300 items. Each item has a description in 4 languages. The description is about 40 characters long, generally less. I have 4 additional attributes on other entities that also are descriptions in four languages, also with less than 40 chars.
Will it be necessary to turn the index for all these 8 attributes? is there any advantage or disadvantage?
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
索引的优点:对该字段的搜索速度更快。
缺点:插入速度较慢,需要额外的存储空间。
在只有 300 行的表中,无论哪种方式都可能不会产生太大的差异。但您必须分析您的特定应用程序才能确定。
Advantages of an index: faster search on that field.
Disadvantages: inserts are slower and additional storage space is required.
In a table of only 300 rows, it probably won't make much of a difference either way. But you will have to profile your particular app to be sure.