Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 938505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T21:39:20+00:00 2026-05-15T21:39:20+00:00

Overview: I’m designing a restaurant management application, and I have an entity called Order

  • 0

Overview: I’m designing a restaurant management application, and I have an entity called Order which has Items. Since a restaurant can operate for many years, with many thousands of completed ‘orders’, and in the interest of making the networking side of my application easier and keeping the database fast, I want to introduce the concept of a ClosedOrder, which is an Order has been paid for, esentially.

I have a few options for doing this: I could add an isClosed attribute to my Order entity, and perform all fetch requests for ‘open’ orders with a predicate, but that keeps the problem of there being lots of records for the DB to go through every time a fetch is needed, which is often with the Order entity because of the workflow of my app. If I understand correctly, creating a ‘ClosedOrder’ subentity would also have the same problem, as Core Data stores all subentities in the same table in the database.

Is creating a completely separate entity foolish in this case? Or is it exactly what I need to do? I apologize for my overall lack of knowledge about database performance, Core Data is beautiful in that it abstracts needing to learn about that away, but at the same time it can’t actually make it not important, especially in a case like this where performance could severely degrade if it’s pushed far by my users.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T21:39:21+00:00Added an answer on May 15, 2026 at 9:39 pm

    If you’re using SQLite store type and the “isClosed” attribute is “Indexed” (a setting in your entity editor panel), you could have hundreds of thousands of orders and still have a nice, quick fetch time when filtering only for “isClosed == YES”.

    Creating a separate entity won’t really buy you much performance but it will make it more of a pain to maintain when things change (two migration steps for the price of one, for example). You’re still storing all those items and SQLite is a competent DB library when it’s setup correctly. Use an indexed attribute here, then generate some test data, then measure the performance. I’m sure you’ll be satisfied.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Overview: I have an array of 20 byte strings that needs to be stored
Is there an exact overview what has changed in the SP1 for .NET 3.5?
What's the widest overview and where are the deepest analysis of different replication methods
How to change overview rule background color in Eclipse 3.4.0.I20080617-2000 (vertical bar on right
I want to get an overview of files that are updated in TFS (that
Is there any way to see an overview of what kind of queries are
Could somebody give me a brief overview of the differences between HTTP 1.0 and
This article gives a good overview on why structured exception handling is bad. Is
I'm looking for a broad overview of what I need to do and in
I'm looking for an overview of algorithms, you need every now and then. If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.