lana-k / sqliteviz

Instant offline SQL-powered data visualisation in your browser
https://sqliteviz.com
Apache License 2.0
2.12k stars 115 forks source link

Can db size large then 1~2 gigabyte? #73

Closed happydentist closed 3 years ago

happydentist commented 3 years ago

I have a sqlite3 database and its size is 1~2 GB, when I drop in sqliteviz and it can not load the db. I can open this db with DB Browser For Sqlite. What happen!

saaj commented 3 years ago

Can db size large then 1~2 gigabyte?

The short answer is "no".

A longer answer is that sql.js (which is a WebAssembly build of SQLite running in a browser) loads whole database in browser's RAM because it doesn't have a filesystem access (where you normally expect SQLite to persist a database).

However, neither sqliteviz nor sql.js limit the memory allocated for the database -- it's your browser that does that. For Chromium the limit seems to be about 2 GiB per tab, but can be increased with max_old_space_size flag to 4 GiB (see this StackOverflow question). For Firefox I couldn't quickly find the limit. So the point is that playing with browsers and flags you can increase the limit, but not significantly.

Documentation is clearly lacking in that regards, and if you're going to experiment how far you can get it, your measurements would be helpful know.

Another answer is https://github.com/lana-k/sqliteviz/issues/51.

happydentist commented 3 years ago

Thanks!