[sqlite] SQLite queries

2015-05-07 Thread Eduardo Morras
On Thu, 7 May 2015 11:25:33 -0500 John McKown wrote: > On Thu, May 7, 2015 at 10:01 AM, Stephen Chrzanowski > wrote: > > > Although I can understand the sarcasm you're sending out, a > > client/server infrastructure would be an interesting task for > > SQLite to do, but to answer the OP, no,

[sqlite] SQLite queries

2015-05-07 Thread Keith Medcalf
> > Although I can understand the sarcasm you're sending out, a > > client/server infrastructure would be an interesting task for > > SQLite to do, but to answer the OP, no, SQLite isn't inherently > > designed to be a client/server. > ?And not really that difficult. Embed SQLite into some

[sqlite] saving :memory:database to disk

2015-05-07 Thread Paul Sanderson
Thanks Marc - it's the latter, very dynamic. Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit -Forensic Toolkit for SQLite email from a work address for a fully functional

[sqlite] saving :memory:database to disk

2015-05-07 Thread Paul Sanderson
I am contemplating a change to a program whereby a database is initailly created in memory and then later if my users choose they can save it to disk and then switch to using the disk based DB. I can obviously create a new disk based db, iterate through sqlite_master and then populate each table.

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Dan Kennedy
On 05/07/2015 04:46 PM, Zaumseil Ren? wrote: >> How are you measuring the size of the database file ? >> >> Simon. > Using the tcl "file" command. > > puts b=[file size $dbfile] > > Please see in the script in the original post. If you do the VACUUM before the "PRAGMA wal_checkpoint" instead of

[sqlite] SQLite queries

2015-05-07 Thread Simon Slavin
On 6 May 2015, at 12:56pm, Amit Golhani wrote: > -database should support requirement of HA and distributed system > - provision for database synchronization and replication should be there as a > part of database package without considering any third party tool > -client server architecture >

[sqlite] saving :memory:database to disk

2015-05-07 Thread Richard Hipp
On 5/7/15, Paul Sanderson wrote: > I am contemplating a change to a program whereby a database is > initailly created in memory and then later if my users choose they can > save it to disk and then switch to using the disk based DB. > > I can obviously create a new disk based db, iterate through

[sqlite] SQLite queries

2015-05-07 Thread Hick Gunter
I prefer my integers unsinged ;) SQLIte: - only signed integers up to 64 bit - arrays and structures only if you are willing to extract them from blobs via user written virtual tables - no date/time type, but you can store microsecond resolution timestamps in 64bit integers -Urspr?ngliche

[sqlite] SQLite queries

2015-05-07 Thread Stephen Chrzanowski
On Thu, May 7, 2015 at 12:25 PM, John McKown wrote: > On Thu, May 7, 2015 at 10:01 AM, Stephen Chrzanowski > wrote: > > > Although I can understand the sarcasm you're sending out, a client/server > > infrastructure would be an interesting task for SQLite to do, but to > answer > > the OP, no,

[sqlite] saving :memory:database to disk

2015-05-07 Thread Marc L. Allen
Don't you already have to have a DB initialization script to create the in-memory database? Couldn't you use that to create the on-disk database, and then have a separate script to copy all the data over? Or is this for more of a dynamic database whereby the users can add/remove tables and

[sqlite] saving :memory:database to disk

2015-05-07 Thread Scott Robison
On Thu, May 7, 2015 at 11:53 AM, Paul Sanderson < sandersonforensics at gmail.com> wrote: > I am contemplating a change to a program whereby a database is > initailly created in memory and then later if my users choose they can > save it to disk and then switch to using the disk based DB. > > I

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Zaumseil René
>If you do the VACUUM before the "PRAGMA wal_checkpoint" instead of after, does >that help? > >Dan. You won the jackpot! Thank you for the tip. May be this should be mentioned in the official documentation. >I think the file actually has shrunk. I just think that the size reported is >not

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Simon Slavin
On 7 May 2015, at 11:25am, Zaumseil Ren? wrote: > But my problem remains :( If I do the script step by step I also do not see > the file shrink in the file explorer. > The dbfile will only shrink "after" I close the db connection. Even with an > explicit "vacuum" command. > > So the question

[sqlite] SQLite queries

2015-05-07 Thread John McKown
On Thu, May 7, 2015 at 10:01 AM, Stephen Chrzanowski wrote: > Although I can understand the sarcasm you're sending out, a client/server > infrastructure would be an interesting task for SQLite to do, but to answer > the OP, no, SQLite isn't inherently designed to be a client/server. > ?And not

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Simon Slavin
> On 7 May 2015, at 10:46am, Zaumseil Ren? wrote: > >> How are you measuring the size of the database file ? > > Using the tcl "file" command. > > puts b=[file size $dbfile] I think tcl gets its file size from the operating system and the operating system doesn't update the size of flies

[sqlite] saving :memory:database to disk

2015-05-07 Thread Scott Hess
On Thu, May 7, 2015 at 11:03 AM, Scott Hess wrote: > On Thu, May 7, 2015 at 10:53 AM, Paul Sanderson gmail.com> wrote: >> I am contemplating a change to a program whereby a database is >> initailly created in memory and then later if my users choose they can >> save it to disk and then switch to

[sqlite] saving :memory:database to disk

2015-05-07 Thread Scott Hess
On Thu, May 7, 2015 at 10:53 AM, Paul Sanderson wrote: > I am contemplating a change to a program whereby a database is > initailly created in memory and then later if my users choose they can > save it to disk and then switch to using the disk based DB. > > I can obviously create a new disk

[sqlite] SQLite queries

2015-05-07 Thread Stephen Chrzanowski
Although I can understand the sarcasm you're sending out, a client/server infrastructure would be an interesting task for SQLite to do, but to answer the OP, no, SQLite isn't inherently designed to be a client/server. But, think of how torrents work. Everyone is a server, everyone is a client.

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Simon Slavin
On 7 May 2015, at 10:12am, Zaumseil Ren? wrote: > I have done "vacuum" right before the b= output. > > But the dbfile will only shrink "after" I have closed the db. How are you measuring the size of the database file ? Simon.

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Zaumseil René
> I think tcl gets its file size from the operating system and the operating > system doesn't update the size of flies with open > handles. But you are going to need someone who knows tcl to check that. I think that would be me :) > > Please see in the script in the original post. > > I'm

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Simon Slavin
On 7 May 2015, at 9:53am, Zaumseil Ren? wrote: > To clarify, I need to shrink the dbfile, not the *wal file. The only thing that will do that under your conditions is VACUUM. Simon.

[sqlite] SQLite queries

2015-05-07 Thread Richard Hipp
On 5/6/15, Amit Golhani wrote: > -client server architecture SQLite is an embedded SQL database. Client/Server is a completely different thing intended to solve a completely different problem. -- D. Richard Hipp drh at sqlite.org

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Zaumseil René
>How are you measuring the size of the database file ? > >Simon. Using the tcl "file" command. puts b=[file size $dbfile] Please see in the script in the original post. Rene Kernkraftwerk Goesgen-Daeniken AG CH-4658 Daeniken, Switzerland Diese Nachricht (inkl. Anhaenge) beinhaltet

[sqlite] SQLite queries

2015-05-07 Thread John McKown
On Thu, May 7, 2015 at 8:56 AM, Richard Hipp wrote: > On 5/6/15, Amit Golhani wrote: > > -client server architecture > > SQLite is an embedded SQL database. Client/Server is a completely > different thing intended to solve a completely different problem. > ?Which is why I didn't even bother

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Zaumseil René
> > To clarify, I need to shrink the dbfile, not the *wal file. > The only thing that will do that under your conditions is VACUUM. > > Simon. I have done "vacuum" right before the b= output. But the dbfile will only shrink "after" I have closed the db. When I try the same in "DELETE" mode

[sqlite] howto shrink files in wal mode

2015-05-07 Thread Zaumseil René
> On 5/5/15, Zaumseil Ren? mailto:RZaumseil at kkg.ch>> > wrote: > > > > Is there a way to shrink the file when it is still open in WAL mode? > > > > Run "PRAGMA wal_checkpoint=TRUNCATE;" in SQLite 3.8.8.2 or later. > -- > D. Richard Hipp > drh at sqlite.org