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

  • Home
  • SEARCH
  • 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 7874075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:42:11+00:00 2026-06-03T02:42:11+00:00

Possible Duplicate: Core Data vs SQLite 3 I have been using SQLite for saving

  • 0

Possible Duplicate:
Core Data vs SQLite 3

I have been using SQLite for saving data in my iOS application (for a table with over 20,000 rows max). However, I’ve encountered a problem with SQLite, where, when I try to use a SELECT statement while I insert data to the table, the SELECT statement won’t work.

Would something like this work in Core Data? Can I retrieve data from the database at the same time as I insert new data into it?

  • 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-06-03T02:42:14+00:00Added an answer on June 3, 2026 at 2:42 am

    Yes, you can do queries and inserts on Core Data at the same time, which I assume you’ll want to do on multiple threads. The best way to do this is to have an NSManagedObjectContext for each thread (or queue).

    The way I’d set it up is to have your main thread (UI) have an NSManagedObjectContext just for fetching the data, and one for inserting on a separate thread, with its parentContext set to the main one. That way when you save on the child context you will see those new objects in the main context and you can do a new fetch (or if you have an NSFetchedResultsController, it will update it for you).

    https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdConcurrency.html#//apple_ref/doc/uid/TP40003385

    The WWDC 2011 videos about core data talk about the parentContext in detail.

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

Sidebar

Related Questions

Possible Duplicate: Core Data not saving NSString. Hey all! Currently experiencing a weird issue
Possible Duplicate: Including FSharp.Core in a C# project: resolving type collisions I have referenced
Possible Duplicate: Extracting dollar amounts from existing sql data? I have a column in
Possible Duplicate: Would a multithreaded Java application exploit a multi-core machine very well? I
Possible Duplicate: iphone tab bar controller and core data In Xcode, I'd like to
I have a Core Data importer that loops through data, and ignores duplicate records
Possible Duplicate: iOS - Detecting whether or not device support phone calls? I'm writing
I'm using Core Data to store a lot (1000s) of items. A pair of
Possible Duplicate: regex for URL including query string I have a text or message.
Possible Duplicate: How can I combine multiple rows into a comma-delimited list in Oracle?

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.