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 8859655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:07:06+00:00 2026-06-14T15:07:06+00:00

Sorry if it has been asked before, I can’t find any question about this

  • 0

Sorry if it has been asked before, I can’t find any question about this issue and I’m new to Obj-C so please be patient with me. Thanks in advance.

I have an application that works with SQLite3 database, I want to work with the database inside the application, In every UIViewController I’m loading the data again from the database. The result is that the application is working a little bit slow in some views and more in others.

So, my question is, how to work with an SQLite3 database? Is the best way is to load the SQLite3 database inside an NSMutableArray of NSMutableDictionary's or to work from the app it self, each time to call the database and to save inside of it?

How can I know when to save the data inside the application if I’m using an NSMutableArray of dictionaries?

Thank you very much.

  • 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-14T15:07:07+00:00Added an answer on June 14, 2026 at 3:07 pm

    It depends a lot upon the nature of your data, but when I’m using a database, it’s generally because I have enough data that I would rather not use up precious memory, and therefore I tend to retrieve data from the database as I need it, view controller to view controller. Memory is one of the more scarce resources on iOS devices, so be careful before you decide to blithely hold data in a NSArray/NSDictionary.

    Obviously, it’s better if you don’t have your SQL code littered throughout your app, so you probably want to encapsulate all of the data retrieval within a single class, if possible. That way you can change the data storage/retrieval mechanisms at some later date, as needed, and you don’t have to change the code all over your program.

    In terms of your observation that the app is a little slow retrieving data from the database, that’s very strange, because retrieving data from a database is generally super quick. The only time I’ve had performance issues is when I was storing BLOB objects (e.g. for the PNG/JPG representations of images) in the database. So, now, unless I’m dealing with tiny, thumbnail-sized images, I’ll store the images in the Documents folder and the database will only maintain the path for those image files.

    But, getting back to your question, if your app is slow, you might want to submit a different question outlining the precise nature of the data and outline the nature of the performance hits you’re suffering, and I’m sure we can try to help you out.

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

Sidebar

Related Questions

Sorry if this has been asked before but I've tried searching and can't find
I'm sorry if this question has been asked before, but I can't seem to
I'm new to this, so sorry if my question has been asked before. I
Sorry if this has been asked before (though I can't really find a solution).
Sorry if this has been asked before, but I can't find a clear enough
Sorry if this has been asked before. I couldn't find a definitive answer. Can
Sorry if this has been asked elsewhere. I have looked but can't find any
Sorry if this has been asked before, I can't seem to find anything. I'm
Sorry if this has been asked before, but I couldn't find a good example
I'm sorry if this question has been asked already, but I couldn't find it

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.