Re: [sqlite] possible integrity problem

2017-01-14 Thread Richard Hipp
On 1/14/17, Simon Slavin wrote: > > Given your 5 indexes, 30 minutes to check an 11GB file is completely > reasonable. Don’t worry about that. > PRAGMA integrity_check looks into a lot of detail - such as verifying that every entry in the table has the correct

Re: [sqlite] Multiple sessions, page sizes and cache

2017-01-14 Thread Kim Gräsman
Hi Clemens, Thanks for your help! On Sat, Jan 14, 2017 at 9:54 AM, Clemens Ladisch wrote: > Kim Gräsman wrote: >> I would expect SQLite to allocate a page cache per session. > > There is typically one page cache instance per connection. > (A connection is what you get from

Re: [sqlite] Multiple sessions, page sizes and cache

2017-01-14 Thread Simon Slavin
On 14 Jan 2017, at 8:54am, Clemens Ladisch wrote: > If your use case is more complex than the simple mechanism offered by > SQLITE_CONFIG_PAGECACHE, consider using SQLITE_CONFIG_PCACHE2 (or > SQLITE_CONFIG_MALLOC). However, the improvement in time provided by this may not

Re: [sqlite] Multiple sessions, page sizes and cache

2017-01-14 Thread Richard Hipp
On 1/13/17, Kim Gräsman wrote: > > In an effort to reduce memory usage/fragmentation, we're trying to > configure SQLite to allocate as much memory as necessary up-front > (based on the excellent information in > https://www.sqlite.org/malloc.html). > The easiest way to do

Re: [sqlite] does integrity check ever modify the db file?

2017-01-14 Thread Richard Damon
On 1/13/17 2:51 PM, Adam Smith wrote: Hey all, can 'pragma integrity_check' ever modify the file? For instance in case of a journal file laying around (which was journal file of the same schema db but a bit different data)? The following is what I think happened: a.db and b.db are two

Re: [sqlite] Multiple sessions, page sizes and cache

2017-01-14 Thread Clemens Ladisch
Kim Gräsman wrote: > I would expect SQLite to allocate a page cache per session. There is typically one page cache instance per connection. (A connection is what you get from sqlite3_open*(); a session would be what you get from sqlite3session_create().) > So if we want to use

Re: [sqlite] Insert into with Id...

2017-01-14 Thread Kees Nuyt
Dear Héctor, On Fri, 13 Jan 2017 21:38:04 -0500, "hfiandor" wrote: > I have implemented the lectura of a csv file in my program as > "import". I have followed yours instructions (the last one and > others previous) . Thanks for your instructions. > > The program works

[sqlite] possible integrity problem

2017-01-14 Thread Kevin O'Gorman
I've got a database that has acted strangely from time to time. Or actually a series of them, since I erase and build from scratch sometimes, as I'm just starting this project. Anyway, the latest is that the DB is about 11 GB. It's pretty simple, just 2 main tables and maybe 5 indexes, no

Re: [sqlite] possible integrity problem

2017-01-14 Thread Simon Slavin
On 15 Jan 2017, at 1:01am, Kevin O'Gorman wrote: > Update: the integrity check said "ok" after about 1/2 hour. > the record count now takes about 4 seconds -- maybe I remembered wrong and > it always took this long, but I wasn't stopping it until it had hung for >

Re: [sqlite] possible integrity problem

2017-01-14 Thread Kevin O'Gorman
Update: the integrity check said "ok" after about 1/2 hour. the record count now takes about 4 seconds -- maybe I remembered wrong and it always took this long, but I wasn't stopping it until it had hung for several minutes. Color me baffled. On Sat, Jan 14, 2017 at 4:49 PM, Kevin O'Gorman