5

I'm using a sqlite db which is very convenient and seems to meet all of my needs at this point.

Currently my db size is <50MB, but I now need to add a new table which will store large text blobs, which will cause the db to reach up to 5GB within the next year.

Would sqlite be able to deal with a 5GB db size? Any caveats to that, compared with say mysql?

GJ.
  • 5,226
  • 13
  • 59
  • 82
  • 1
    see complete details on large sqlite DBs in: http://stackoverflow.com/q/784173/462865, shortly I can answer 5GB can be handled by sqlite well. – Amir Ali Akbari Dec 09 '12 at 11:26

4 Answers4

4

I'm not a huge expert on databases, but most of the DB-related work I've done used SQLite. In my experience, making the database larger in-itself shouldn't incur a large performance hit. Naturally you'll have more data, so prepare to spend more time querying it!

Consider this thought experiment: you have a table named mydata you use all the time in the DB. Now, you add an unrelated table otherdata. Your queries for mydata don't depend on the information in otherdata. Even if you shove GBs of data into otherdata, you won't feel any real performance hit in your usage of mydata.

AFAIK, the architecture of SQLite supports this claim.

Eli Bendersky
  • 263,248
  • 89
  • 350
  • 412
3

SQLite should be just fine for what you want to do. Size really isn't a concern. As long as your data file can reside on the same computer that's making the call, you should be just fine. If you put it on the network, that's ok, but multi-user access is subject to the bugs of the operating system when it comes to locking records, etc. Per comparing with mysql, since you've eliminated the server, you've also eliminated the network traffic associated with the data retrieval. this should speed things up.

-don

Don Dickinson
  • 6,200
  • 3
  • 35
  • 30
3

As stated in Sqlite FAQS , FAQ

look at point 12 , it says max limit of sqlite db can be upto 140 TB!!

Community
  • 1
  • 1
Pratik Bhat
  • 7,166
  • 2
  • 35
  • 57
  • It says 140TB (as of now), not 14TB. – til_b Jan 29 '15 at 12:37
  • I just want to add that 140 TB is a theoretic limit and it never been tested : "This particular upper bound is untested since the developers do not have access to hardware capable of reaching this limit." But probably a 5GB SQlite database is not a problem. – Galabyca Mar 21 '16 at 15:52
0

I find using indexes will save your time a lot, you can have a try!

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 08 '21 at 02:57
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/30532943) – Ailurophile Dec 12 '21 at 03:48