[sqlite] Suggestions for Fast Set Logic?

2015-07-09 Thread Simon Slavin
On 9 Jul 2015, at 9:37pm, Igor Tandetnik wrote: > On 7/9/2015 11:25 AM, Andy Rahn wrote: > >> I want to build an application that can search for specific documents based >> on a lot of criteria from a user (e.g. matching keywords, text, etc...). >> And then to combine these results using

[sqlite] Suggestions for Fast Set Logic?

2015-07-09 Thread Keith Medcalf
create table data ( data_id integer primary key, ... ); create table keywords ( keyword_id integer primary key, keyword text collate nocase unique ); create table n2mKeywords ( data_id integer references data, keyword_id integer references keywords, primary

[sqlite] busy_timeout() not working always?

2015-07-09 Thread Keith Medcalf
Turn off shared-cache mode. Shared-cache is designed for use on itty-bitty-tiny computers with only a few KB of RAM and very paltry CPU resources. On equipment for which shared cache was designed, you are unable to run "intense database actions" on multiple threads, and are therefore

[sqlite] busy_timeout() not working always?

2015-07-09 Thread Simon Slavin
On 9 Jul 2015, at 1:39pm, Constantine Yannakopoulos wrote: > On Thu, Jul 9, 2015 at 2:47 PM, Simon Slavin wrote: > >> Temporarily turn off shared cache mode, and use a separate connection for >> each thread. See if your SQLITE_BUSY reports go away. > > ?Thanks. It seems that the problem

[sqlite] Suggestions for Fast Set Logic?

2015-07-09 Thread Igor Tandetnik
On 7/9/2015 11:25 AM, Andy Rahn wrote: > I want to build an application that can search for specific documents based > on a lot of criteria from a user (e.g. matching keywords, text, etc...). > And then to combine these results using boolean logic ... For example, > keyword 'animal' AND rating > 3

[sqlite] Result set creation

2015-07-09 Thread Sairam Gaddam
I created a custom Result set in Resultrow case in sqlite3VdbeExec function as below custom_pResultSet = (Mem*) malloc(sizeof (Mem) * (custom_numElements)); and I initialized it using sqlite3VdbeMemInit function. for( i = 0 ; i < custom_numElements ; i++ ) {

[sqlite] busy_timeout() not working always?

2015-07-09 Thread Constantine Yannakopoulos
On Thu, Jul 9, 2015 at 2:47 PM, Simon Slavin wrote: > Temporarily turn off shared cache mode, and use a separate connection for > each thread. See if your SQLITE_BUSY reports go away. > ?Thanks. It seems that the problem goes away if I turn shared cache mode off.? Does this means that shard

[sqlite] busy_timeout() not working always?

2015-07-09 Thread Constantine Yannakopoulos
Thanks for your response. On Thu, Jul 9, 2015 at 3:20 PM, Jay Kreibich wrote: > The sqlite3_busy_timeout() function is just a wrapper for > sqlite3_busy_handler(). > ?I know that, and I have no? busy_handler installed. > As explained at http://www.sqlite.org/c3ref/busy_handler.html, the use

[sqlite] busy_timeout() not working always?

2015-07-09 Thread Constantine Yannakopoulos
?Hello all, I have a multithreaded server that may perform intense database actions (both reads and writes) concurrently from different threads against two database connection (sqlite3* objects) to the same database file. The database connections are in shared-cache mode and I have implemented

[sqlite] busy_timeout() not working always?

2015-07-09 Thread Simon Slavin
On 9 Jul 2015, at 12:45pm, Constantine Yannakopoulos wrote: > What may I be doing wrong? Temporarily turn off shared cache mode, and use a separate connection for each thread. See if your SQLITE_BUSY reports go away. Simon.

[sqlite] SIGSEGV rolling back in-memory DB‏‎

2015-07-09 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/08/2015 10:33 AM, Brian Soby wrote: > Nothing appears to happen but it's not running very faithfully. > Specifically, I get a bunch of problems on the rollbacks about the > savepoints not existing even though it's replaying the original >

[sqlite] Suggestions for Fast Set Logic?

2015-07-09 Thread Andy Rahn
I want to build an application that can search for specific documents based on a lot of criteria from a user (e.g. matching keywords, text, etc...). And then to combine these results using boolean logic ... For example, keyword 'animal' AND rating > 3 Each document has an integer id. My strategy

[sqlite] busy_timeout() not working always?

2015-07-09 Thread Jay Kreibich
The sqlite3_busy_timeout() function is just a wrapper for sqlite3_busy_handler(). As explained at http://www.sqlite.org/c3ref/busy_handler.html, the use of a busy handler does not avoid all SQLITE_BUSY situations: The presence of a busy handler does not guarantee that it will be invoked when