Should I worry about sqlite filesize?

When writing my own flat file bases, I try to keep the file sizes as small as possible. When developing mySQL databases, I put all my tables in one database (I believe that mySQL stores each table in its own file). I am new to sqlite and my encounter with ethics is a whole database stored in a single file.

I know that the recommended size is about 2 GB per sqlite database, and I do not expect that size to be achieved, but is there any potential for dividing the database? For example, splitting a database into two, one with different settings tables (multiple tables, a small number of rows), the other with different content tables (several tables, many rows in each).

I have a good understanding of file systems, and I know that I should not worry about this, but there is a feeling that I just can not get rid of the need to split the database. Does this feeling ignore or run with?

+4
source share
2 answers

If you are not going to store a large amount of data in a database, it really does not matter. If you are going to store a lot of data, including blobs and complex relationships, you should not use SQLite in any case - for which large database systems are needed.

SQLite exists to have a simple, fast, and compact way to store structured data in offline, standalone applications. You can also use it as a file format for your applications, so you don't have to reinvent the wheel every time. Personally, I use it to store preferences and I'm sure that it works on different platforms. You can also use standard database management tools.

You know, there is a term called "engineering." Sometimes it’s very simple to go with a simple, quick approach and divide things into separate tables and modules; sometimes this is not so.

+6
source

It doesn't look like your β€œsettings” database would take into account enough space to be worth it. You can also easily save these settings tables in the primary database and cache parameter values ​​to avoid repeated queries in these tables.

0
source

All Articles