The new Core Data object is identical to the existing one: a separate object or another solution?

Overview: I am developing a restaurant management application, and I have an organization called Order that has elements. Since the restaurant can work for many years, with many thousands of completed “orders”, and in the interests of simplifying the network support of my application and quickly storing the database, I want to introduce the concept of ClosedOrder, which is the Order was paid in particular.

I have several options for this: I could add the isClosed attribute for my Order object and execute all the select queries for "open" orders using a predicate, but this does not solve the problem of having a large number of records for DB to go through each time when a selection is required, which is often associated with an Order object due to the workflow of my application. If I understand correctly, creating a SubClode entity will also have the same problem as Core Data, which stores all entities in one table in the database.

Does a completely separate object create stupid in this case? Or is this exactly what I need to do? I apologize for my general lack of knowledge about database performance, Core Data is wonderful in that it has essays that need to be found out about it, but at the same time it cannot actually make it unimportant, especially in that case, when performance can get worse if it hits my users hard.

+2
source share
1 answer

SQLite, isClosed - "Indexed" ( ), "isClosed == YES".

, , (, ). , SQLite . , , . , .

+2

Source: https://habr.com/ru/post/1755885/


All Articles