Re: [sqlite] PRAGMA cache_size=0 increases memory usage

2017-05-18 Thread Bob Friesenhahn
On Thu, 18 May 2017, Kim Gräsman wrote: The request is issued early on when the connection is first opened so no actual queries have been issued at that time. Then my (black-box) guess is that you're seeing the bump from allocating heap space for whatever structures the schema needs. Our

Re: [sqlite] PRAGMA cache_size=0 increases memory usage

2017-05-18 Thread Kim Gräsman
On Thu, May 18, 2017 at 8:27 PM, Bob Friesenhahn wrote: > On Thu, 18 May 2017, Kim Gräsman wrote: > >> On Thu, May 18, 2017 at 6:10 PM, Bob Friesenhahn >> wrote: >>> >>> Does anyone know why using 'PRAGMA cache_size=0' (or some other

Re: [sqlite] SQLite in memory

2017-05-18 Thread Gabriele Lanaro
Thanks everyone for all the tips! This is all very useful. We are using SQLite’s FTS5 feature to search a large number of text files. There are 50M records in total but they are split across 1000 smaller databases of 50K records each. Each DB is 250MB in size. I am trying to test query

Re: [sqlite] PRAGMA cache_size=0 increases memory usage

2017-05-18 Thread Bob Friesenhahn
On Thu, 18 May 2017, Kim Gräsman wrote: On Thu, May 18, 2017 at 6:10 PM, Bob Friesenhahn wrote: Does anyone know why using 'PRAGMA cache_size=0' (or some other small value) to attempt to decrease memory usage (and it is reported as immediately decreased in the

Re: [sqlite] PRAGMA cache_size=0 increases memory usage

2017-05-18 Thread Kim Gräsman
On Thu, May 18, 2017 at 6:10 PM, Bob Friesenhahn wrote: > Does anyone know why using 'PRAGMA cache_size=0' (or some other small value) > to attempt to decrease memory usage (and it is reported as immediately > decreased in the shell by .stats) actually significantly

Re: [sqlite] PRAGMA cache_size=0 increases memory usage

2017-05-18 Thread Bob Friesenhahn
On Thu, 18 May 2017, Simon Slavin wrote: On 18 May 2017, at 5:10pm, Bob Friesenhahn wrote: Does anyone know why using 'PRAGMA cache_size=0' (or some other small value) to attempt to decrease memory usage (and it is reported as immediately decreased in the

Re: [sqlite] NOT NULL integer primary key

2017-05-18 Thread Paul Sanderson
Ahh being dull and in a hurry thanks 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 demo

Re: [sqlite] PRAGMA cache_size=0 increases memory usage

2017-05-18 Thread Simon Slavin
On 18 May 2017, at 5:10pm, Bob Friesenhahn wrote: > Does anyone know why using 'PRAGMA cache_size=0' (or some other small value) > to attempt to decrease memory usage (and it is reported as immediately > decreased in the shell by .stats) actually significantly

Re: [sqlite] NOT NULL integer primary key

2017-05-18 Thread Gwendal Roué
> Le 18 mai 2017 à 18:16, Paul Sanderson a écrit > : > > Is this a bug? > > Create table test (id integer not null primary key, data text); > insert into test values (null, 'row1'); > select * from test; > 1, row1 > > I know that if you provide a NULL value to a

[sqlite] NOT NULL integer primary key

2017-05-18 Thread Paul Sanderson
Is this a bug? Create table test (id integer not null primary key, data text); insert into test values (null, 'row1'); select * from test; 1, row1 I know that if you provide a NULL value to a column define as integer primary key that SQLite will provide a rowid, but should the not null

[sqlite] PRAGMA cache_size=0 increases memory usage

2017-05-18 Thread Bob Friesenhahn
Does anyone know why using 'PRAGMA cache_size=0' (or some other small value) to attempt to decrease memory usage (and it is reported as immediately decreased in the shell by .stats) actually significantly increases heap memory usage? I find this to be an interesting phenomena. Bob -- Bob

Re: [sqlite] SQLite in memory

2017-05-18 Thread Eduardo Morras
On Wed, 17 May 2017 22:18:19 -0700 Gabriele Lanaro wrote: > Hi, I'm trying to assess if the performance of my application is > dependent on disk access from sqlite. > > To rule this out I wanted to make sure that the SQLite DB is > completely accessed from memory and

Re: [sqlite] SQLite in memory

2017-05-18 Thread Keith Medcalf
On Wednesday, 17 May, 2017 23:18, Gabriele Lanaro wrote: > Hi, I'm trying to assess if the performance of my application is dependent > on disk access from sqlite. Of course it is. Depending on what your application is doing. > To rule this out I wanted to make

Re: [sqlite] Request for ISO Week in strftime()

2017-05-18 Thread Olivier Mascia
In ISO the weeks are indeed from Monday (1) to Sunday (7) and all days between a Monday and Sunday belong to the same week. The first week (1) of a year is the one containing the first Thursday of the year. Or said differently containing the 4th of January. This implies that : week 1 can start

Re: [sqlite] SQLite in memory

2017-05-18 Thread Paul
If by any chance you have access to Linux or alike, you can just mount a ramfs and move database file over there. It is a usual file system that lives in RAM. This will 100% guarantee you that no disk access will be made by SQLite. 18 May 2017, 08:18:47, by "Gabriele Lanaro"