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

The Archive Base Latest Questions

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

I use in my iPhone application a very big database. An index is used

  • 0

I use in my iPhone application a very big database. An index is used on one of its columns in oder to make the searchs in this database faster. The problem is that this index increases the size of the database : my application is now bigger than 20 Mo requiring a wifi download (I would like to remain below 20 Mo in order to allow 3G download).

Consequently, in order to reduce the size of this database, I would like to create the index on the iPhone of the user when the application is launched for the first time.

The SQLite query I want to execute is the following one :

“CREATE INDEX INDEX_ON_MYCOLUMN ON MY_TABLE (MYCOLUMN)”

Do you know how to include this query in my XCode code ? sqlite3_something ?

By the way, how to compact programmatically the database after this operation ?

Thanks a lot for your help !

  • 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:45:02+00:00Added an answer on May 15, 2026 at 9:45 pm

    sqlite3_exec() will probably do what you want. You can run it on every launch instead of just the first launch (the additional times will just fail harmlessly). Of course, your launch times might become terrible.

    See also VACUUM ANALYZE.

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

Sidebar

Related Questions

I use UIScrollView to make large-sized (larger than 320px) UI on iPhone. I made
How can I make an iphone application that uses a UITableView but so the
I have a very simple application where I am trying to use the gyroscope
We are a very small mobile company (building an application for the iphone) and
A lot of iPhone apps use a blue badge to indicate the number of
Is there a compression API available for use on the iPhone? We're building some
In the iPhone is there a way I can use JavaScript to close the
Does iPhone support XML-RPC, Is their any open source framework which I can use?
Is it possible to use an image captured with the iPhone's camera as a
I am trying to use the PLDatabase framework in my iPhone app. I've added

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.