Re: [sqlite] Interrupt first sqlite3_step in FTS3 query

2010-02-20 Thread Simon
> Scott meant that most of the job fts is doing is actually calls to sqlite > core that checks this state very often. I just did a windows desktop test > with the fts3, my second thread is ordered to call sqlite_interrupt after 1 > second sleep and different tests confirms his explanation

Re: [sqlite] Interrupt first sqlite3_step in FTS3 query

2010-02-20 Thread Max Vlasov
> The fts implementation does work in response to data gotten from > > SQLite calls, and feeds data back out via SQLite calls, which should > > all start throwing errors and causing things to unwind. Most > > expensive fts operations involve lots of subsidiary queries into the > > SQLite core >

Re: [sqlite] Interrupt first sqlite3_step in FTS3 query

2010-02-20 Thread Simon
> The fts implementation does work in response to data gotten from > SQLite calls, and feeds data back out via SQLite calls, which should > all start throwing errors and causing things to unwind. Most > expensive fts operations involve lots of subsidiary queries into the > SQLite core But do any

Re: [sqlite] Interrupt first sqlite3_step in FTS3 query

2010-02-20 Thread Scott Hess
On Sat, Feb 20, 2010 at 4:28 AM, Max Vlasov wrote: > you mentioned full-text search. > I just tried to search for mentioning of sqlite3_interrupt in the sqlite > sources > The main is the implemention of the function itself that just sets the > isInterrupted variable: > >

Re: [sqlite] Query plan of MAX (id) versus MAX (id) + 1 in a range

2010-02-20 Thread Simon Slavin
On 20 Feb 2010, at 1:14pm, Artem Kozarezov wrote: > Also, it would be nice and intuitive if the MAX (id) and MAX (id) + 1 worked > optimally within a range! Just out of interest, and I know that theoretically this is not an optimal statement, but have you compared this with the results of

[sqlite] Query plan of MAX (id) versus MAX (id) + 1 in a range

2010-02-20 Thread Artem Kozarezov
Let's create and populate a test table: sqlite> CREATE TABLE foo (id INTEGER PRIMARY KEY NOT NULL); sqlite> INSERT INTO foo VALUES (1); sqlite> INSERT INTO foo VALUES (100); sqlite> INSERT INTO foo VALUES (200); sqlite> INSERT INTO foo SELECT MAX (id) + 1 FROM foo WHERE id >= 100 AND id < 200;

[sqlite] SQLite BUSY error - single-threaded app

2010-02-20 Thread Alan Thomas
I'm currently working with version 3.6.14 on Windows XP/SP4 (32-bit). The application is coded for Unicode. I wrote all of the application (MS C++ native code) excluding SQLite, so I'm confident that it is a single-threaded app. Threads have never been part of its design. The failure occurs in

Re: [sqlite] Interrupt first sqlite3_step in FTS3 query

2010-02-20 Thread Max Vlasov
Simon, you mentioned full-text search. I just tried to search for mentioning of sqlite3_interrupt in the sqlite sources The main is the implemention of the function itself that just sets the isInterrupted variable: void sqlite3_interrupt(sqlite3 *db){ db->u1.isInterrupted = 1; } but all of of

Re: [sqlite] Interrupt first sqlite3_step in FTS3 query

2010-02-20 Thread Simon
> I am very surprise that your SQLite operation can take so > long. Is it a very complicated search? Multiple writes? it is a 'SELECT docid FROM fulltext WHERE Content MATCH' on a table with ~13 rows. The database (with only the fulltext tables is ~110MB) >> I have a text field that