Re: [sqlite] Best way to "split" a large DB into two DBs

2016-09-08 Thread Dominique Devienne
On Wed, Sep 7, 2016 at 7:08 PM, Dan Kennedy wrote: > On 09/07/2016 11:08 PM, Dominique Devienne wrote: > >> Initial design was to copy the DB file (app is "shutdown", so no >> connection >> to that DB file). >> Drop the 5 big tables. Vaccum it (the new DB). Add the new

Re: [sqlite] Best way to "split" a large DB into two DBs

2016-09-07 Thread Eduardo Morras
On Wed, 7 Sep 2016 18:08:50 +0200 Dominique Devienne wrote: > Imagine there's a 25GB SQLite DB file in version v1 of an application. > > Because the way this DB is structured, with large to very large > blobs, this leads to problems for the app. That DB has 35 tables, but >

Re: [sqlite] Best way to "split" a large DB into two DBs

2016-09-07 Thread Dan Kennedy
On 09/08/2016 12:57 AM, Clay Gerrard wrote: On Wed, Sep 7, 2016 at 10:08 AM, Dan Kennedy wrote: [...] then attach it and your main db to the same handle so that you can use an "INSERT INTO ... SELECT ..." statement Can you elaborate or provide any reference materials

Re: [sqlite] Best way to "split" a large DB into two DBs

2016-09-07 Thread Simon Slavin
On 7 Sep 2016, at 6:57pm, Clay Gerrard wrote: > Can you elaborate or provide any reference materials for this "attach it > and your main db to the same handle" procedure? Simon. ___

Re: [sqlite] Best way to "split" a large DB into two DBs

2016-09-07 Thread Clay Gerrard
On Wed, Sep 7, 2016 at 10:08 AM, Dan Kennedy wrote: > > [...] then attach it and your main db to the same handle so that you can > use an "INSERT INTO ... SELECT ..." statement Can you elaborate or provide any reference materials for this "attach it and your main db to

Re: [sqlite] Best way to "split" a large DB into two DBs

2016-09-07 Thread Dan Kennedy
On 09/07/2016 11:08 PM, Dominique Devienne wrote: Imagine there's a 25GB SQLite DB file in version v1 of an application. Because the way this DB is structured, with large to very large blobs, this leads to problems for the app. That DB has 35 tables, but 5 of those represent 95% of the DB size

Re: [sqlite] Best way to "split" a large DB into two DBs

2016-09-07 Thread Stephen Chrzanowski
What are the business logic reasons you want to split the database? Is your application going to be able to handle dealing with data that'd exist in multiple places? When I know I'm going to be putting large blobs within a database, those blob tables have two fields, one ID, and one for the

[sqlite] Best way to "split" a large DB into two DBs

2016-09-07 Thread Dominique Devienne
Imagine there's a 25GB SQLite DB file in version v1 of an application. Because the way this DB is structured, with large to very large blobs, this leads to problems for the app. That DB has 35 tables, but 5 of those represent 95% of the DB size (because of those blobs). So for v2 of the app,