1

In my Core Data database, all my entities inherit from a parent entity.

For this reason, I've just realized that, under the wood, all entries are added to 1 table (a table for all entities), rather than multiple tables (a table for each entity) in SQLite.

I'm wondering if this terribly affect performances, since all my data is inserted in 1 table.

thanks

4

1 回答 1

0

它会影响性能,但多少取决于对象之间有多少共性以及您拥有多少个对象。如果几乎没有共性,并且您不需要托管对象子类的关联类继承,那么将所有内容都设为同一实体的子类并不是很有用。使用仪器检查发生了什么。性能问题可能是由其他因素引起的,例如您的获取请求结构和批量大小。

于 2013-07-18T09:41:34.553 回答