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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:28:16+00:00 2026-06-13T13:28:16+00:00

I am retrieving 10,000 records from an Ultralite database to an array. My query

  • 0

I am retrieving 10,000 records from an Ultralite database to an array.

My query is taking 3 seconds load values to the array. This is making the UI to freeze for 3 seconds whenever i click to open the view controller.

I want to open the view controller immediately and show Activity indicator for 3 seconds while my query is executing in background.

And if possible i want to show row animation and show row count like “Number Of Products retrieved is 5045” dynamically.

Please, can anyone help me on this?

Thanks in advance.

EDIT:

NSMutableArray *customerArray = [[DB sharedInstance] LoadCustomerOverview];

The “LoadCustomerOverview” is a function which is having the select statement which retrieves 10,000 records from Ultrlite database.

The above line is taking 3 seconds. I checked this with NSLog before and after above statement. Using this “customerArray” i will fill the UITableview in my view controller,which is taking only Milli seconds to prepare cells.

Problem is with the above line.

How can i solve this problem? or any other way to improve performance?

Thanks in advance.

  • 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-13T13:28:17+00:00Added an answer on June 13, 2026 at 1:28 pm

    Accept from all other good answers, this may little different, there’s (mostly) 10-11 for iPhone device and its double in iPad devices (I’m not having exact idea), number of rows visible to users in UITableView. If you really don’t need to process or show all 10k records at once, I think you really don’t query for all as it takes good memory and processing time as questioned by you. Instead you can fetch (query for) 1k (or even some small amount) of records at once, once you get 1k (or the amount of you want) you can query for the next and that should be in [self performSelectorInBackground:@selector(getRecordsFromDatabase) withObject:]; so your app will never freeze & user won’t feel any interrupts, This scenario could only achieve if your data is persistent and having a unique row identifier key (primary key), also if you’re query those data in either ascending or descending order, for other cases like, if you want any random data then this answer can’t work.

    Also note that, putting code in viewDidAppear & UIActivityIndicator may be your solution, but in case you’ll fetching some more amount of rows that time it will interruptable for user.

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

Sidebar

Related Questions

I am retrieving an array values from database which save multi dimensional array..i want
How would one go about retrieving the last 1,000 values from a database via
I am retrieving value from my notepad(database) like this strLine = br.readLine().trim(); if ((strLine.length()!=0)
I was retrieving some date records from my database with the following results: Date
I am retrieving data from database using select query.My requirement is i have to
I'm retrieving a signed int from a SQL Server database and need to convert
I'm retrieving a set of location names from a MySQL database using PHP and
I am retrieving 3 fields from a database, and by default, only the username
When retrieving data from a database is it more efficient on server resources to
The problem is like this: I am retrieving latitude and longitude from a point

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.