Re: [sqlite] Support for concurrent transactions

2014-06-21 Thread Simon Slavin
On 22 Jun 2014, at 1:56am, RSmith wrote: > Have you incurred quite a time-penalty doing the other work (which you > described above) in this manner, other than initial learning curve? One method to do what I wanted is to have each task do its own sqlite3_open() and

Re: [sqlite] Support for concurrent transactions

2014-06-21 Thread Simon Slavin
On 22 Jun 2014, at 1:42am, Ward Willats wrote: > Do you mean nested transactions? No. Two independent parts of my app without any idea that the other exists. Perhaps one change which the user is consciously making and another monthly processing task which is

Re: [sqlite] Support for concurrent transactions

2014-06-21 Thread RSmith
On 2014/06/21 22:36, Simon Slavin wrote: Hello gang. I recently did some work with another system which supported transactions (a journaling file system) then came back to SQLite and saw it with a different eye. In my programming for SQLite so far either each database change has been

Re: [sqlite] Support for concurrent transactions

2014-06-21 Thread Ward Willats
On Jun 21, 2014, at 1:36 PM, Simon Slavin wrote: > But the programming style I've been using recently does the equivalent of > allowing any number of concurrent "BEGIN"s and handing back a handle for each > one. You can execute any number of commands (SELECT or write)

[sqlite] Support for concurrent transactions

2014-06-21 Thread Simon Slavin
Hello gang. I recently did some work with another system which supported transactions (a journaling file system) then came back to SQLite and saw it with a different eye. In my programming for SQLite so far either each database change has been handled by a different PHP process which opened a

Re: [sqlite] Performance issue using SQLite

2014-06-21 Thread Clemens Ladisch
163 wrote: > I met a performance issue when using SQLite 3.8.4.3. I found it would > be quite slow trying to select count(*) using a where statement with > several OR condition. For example: > > select ctrl_no from T_CTRL_CLRRULE where CTRL_NO='%s' and ((PRODUCT_ID='%s' > and OPERATE_TYPE='%s')

[sqlite] Performance issue using SQLite

2014-06-21 Thread 163
> Hi Experts, > I met a performance issue when using SQLite 3.8.4.3. I found it would be > quite slow trying to select count(*) using a where statement with several OR > condition. For example: > > sprintf (sql_str, "select ctrl_no from T_CTRL_CLRRULE where CTRL_NO='%s' and >

Re: [sqlite] Bug in "with" query

2014-06-21 Thread Clemens Ladisch
Jean-Luc Hainaut wrote: > Python 2.7.6, SQLite v3.8.5 So this is not the standard Python distribution? > import sqlite3 > conn = sqlite3.connect('ORDERS.db') > c = conn.cursor() > > query = "with CTE1(ID,Name,City)"\ > + " as (select CustID,Name from CUSTOMER where City = 'London')"\ >

[sqlite] Bug in "with" query

2014-06-21 Thread Jean-Luc Hainaut
Hi, Context: Python 2.7.6, Windows XP, SQLite v3.8.5 The test program: import sqlite3 conn = sqlite3.connect('ORDERS.db') c = conn.cursor() query = "with CTE1(ID,Name,City)"\ + " as (select CustID,Name from CUSTOMER where City = 'London')"\ + " select * from CTE1"