Re: [sqlite] SQLITE wal file size keeps growing

2014-12-18 Thread Dan Kennedy
On 12/19/2014 11:22 AM, Kushagradhi Bhowmik wrote: I am writing continuously into a db file which has PRAGMA journal_mode=WAL, PRAGMA journal_size_limit=0. My C++ program has two threads, one reader(queries at 15 sec intervals) and one writer(inserts at 5 sec intervals). Every 3 min I am

Re: [sqlite] Row filtering prior to aggregate function execution

2014-12-18 Thread Hick Gunter
SELECT ...,sum(...),count() FROM ... WHERE security(...) ... With a user defined function security(). -Ursprüngliche Nachricht- Von: Roland Martin [mailto:rolandsmar...@gmail.com] Gesendet: Donnerstag, 18. Dezember 2014 17:09 An: sqlite-users@sqlite.org Betreff: [sqlite] Row filtering

Re: [sqlite] SQLITE wal file size keeps growing

2014-12-18 Thread GB
Readers do not need long-lasting transactions (if any at all), so I'd rather suspect your writer to be the culprit. Does it use lasting transactions? If so, make it commit the transaction before checkpointing. regards gerd ___ sqlite-users mailing

[sqlite] SQLITE wal file size keeps growing

2014-12-18 Thread Kushagradhi Bhowmik
I am writing continuously into a db file which has PRAGMA journal_mode=WAL, PRAGMA journal_size_limit=0. My C++ program has two threads, one reader(queries at 15 sec intervals) and one writer(inserts at 5 sec intervals). Every 3 min I am pausing insertion to run a sqlite3_wal_checkpoint_v2() from

Re: [sqlite] Row filtering prior to aggregate function execution

2014-12-18 Thread Clemens Ladisch
Roland Martin wrote: > I have a need to filter the result set before aggregate functions are > performed. Use the WHERE clause. > Unfortunately I cannot query the security system to find out all valid > values and add these values to the where clause. I have to give a value to > the security

[sqlite] Row filtering prior to aggregate function execution

2014-12-18 Thread Roland Martin
I have a need to filter the result set before aggregate functions are performed. For example, a query with a group by clause produces a result set of 5 rows with count() and sum(). For each of the 5 rows I need the value of a single column to serve as input into a security check. If the security

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread Paul
> > Just out of curiosity, I want to ask one more question. > > How can FK constraint fail if I am removing (replacing) row from the > > 'child' table? > > The FK constraint can fail because a new row is being inserted into the > child table. The reason statement rollback may be required is

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread RSmith
On 2014/12/18 12:03, Dan Kennedy wrote: On 12/18/2014 04:16 PM, Paul wrote: I understand. I guess, I'll have to stick to UPDATE <-> INSERT. Thank you for taking your time. Just out of curiosity, I want to ask one more question. How can FK constraint fail if I am removing (replacing) row from

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread Dan Kennedy
On 12/18/2014 04:16 PM, Paul wrote: Hi, Dan. On 12/18/2014 02:41 PM, Paul wrote: I want to confirm that issue is fixed for me. Thanks again, Dan! Please ignore this update, patch fixes this problem as well. I want to add even more input for this issue. I understand why there is implicit

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread Paul
Hi, Dan. > On 12/18/2014 02:41 PM, Paul wrote: > >> I want to confirm that issue is fixed for me. > >> Thanks again, Dan! > >> > >> > >> Please ignore this update, patch fixes this problem as well. > >> > >>> I want to add even more input for this issue. > >>> I understand why there is implicit

Re: [sqlite] Abnormal memory usage when removing rows within nested transaction from a table, referenced by another table via FK,

2014-12-18 Thread Dan Kennedy
On 12/18/2014 02:41 PM, Paul wrote: I want to confirm that issue is fixed for me. Thanks again, Dan! Please ignore this update, patch fixes this problem as well. I want to add even more input for this issue. I understand why there is implicit savepoint, when I remove row from 'parent'