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
true if the objects resulting from a fetch using the
NSFetch are faults; otherwise, it is
false. The default value is
true. This setting is not used if the result type (see
NSManaged, as object IDs do not have property values. You can set
false 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
true; 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
false to avoid the additional overhead.