A Boolean value that indicates whether the objects resulting from a fetch request are faults.
- iOS 3.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Data
This value is
YES if the objects resulting from a fetch using the
NSFetch are faults; otherwise, it is
NO. The default value is
YES. This setting is not used if the result type (see
NSManaged, as object IDs do not have property values. You can set
NO to gain a performance benefit if you know you will need to access the property values from the returned objects.
When you execute a fetch, by default
YES; Core Data fetches the object data for the matching records, fills the row cache with the information, and returns managed object as faults. These faults are managed objects, but all of their property data resides in the row cache until the fault is fired. When the fault is fired, Core Data retrieves the data from the row cache. Although the overhead for this operation is small, for large datasets it may not be trivial. If you need to access the property values from the returned objects (for example, if you iterate over all the objects to calculate the average value of a particular attribute), then it is more efficient to set
NO to avoid the additional overhead.