Re: [sqlite] How to interrupt a long running update without roll back?

2013-06-24 Thread Simon Slavin
On 25 Jun 2013, at 1:41am, jhnlmn wrote: > Using trigger during insert slows down insert by about 20%. > This is not much, but unnecessary as long as AUTOINCREMENT > does not reach the maximum value. > As other people mentioned, this is unlikely to happen > in our lifetime.

Re: [sqlite] How to interrupt a long running update without roll back?

2013-06-24 Thread jhnlmn
Keith Medcalf writes: > ... you can create a trigger that adds the rowid of > rows inserted (ie, that you need to update) into another table. Using trigger during insert slows down insert by about 20%. This is not much, but unnecessary as long as AUTOINCREMENT does not reach the

Re: [sqlite] How to interrupt a long running update without rollback?

2013-06-24 Thread jhnlmn
Peter Aronson writes: > create trigger if not exists iupdate_up before update on iupdate > begin > select raise(fail,'halt in processing requested') where old.c1 = 7; > end; Yes, thank you, this raise(fail, ...) does, indeed, aborts the update loop without rolling back all

Re: [sqlite] How to interrupt a long running update without rollback?

2013-06-24 Thread Peter Aronson
Good point.  However, it looks to me that if you replace ignore with fail (and a message) you may get the semantics you want.  Here's a little test script:   drop table if exists iupdate; create table if not exists iupdate (c1 integer primary key,tag text);   insert into iupdate (tag) values

Re: [sqlite] How to interrupt a long running update without roll back?

2013-06-24 Thread jhnlmn
Peter Aronson writes: > create trigger inter_update before update on my_table > begin >    select raise(ignore) where my_function() = 1; > end; No, this is the worst approach so far. This "raise(ignore)" does abort that single update of that particular row, but the loop

Re: [sqlite] In-Memory databases and no VFS

2013-06-24 Thread Richard Hipp
On Mon, Jun 24, 2013 at 10:28 AM, Andrew Beal wrote: > Hello All, > > I am trying to implement SQLite on our embedded platform. Since I am in > the process of implementing the VFS, I was trying to give our other > developers the chance to use the in-memory database while we

[sqlite] In-Memory databases and no VFS

2013-06-24 Thread Andrew Beal
Hello All, I am trying to implement SQLite on our embedded platform. Since I am in the process of implementing the VFS, I was trying to give our other developers the chance to use the in-memory database while we implement the VFS, however I have noticed that the open code for a database refers

Re: [sqlite] Sqlite accepts invalid column names

2013-06-24 Thread Richard Hipp
On Mon, Jun 24, 2013 at 8:32 AM, Rob Golsteijn wrote: > > I found the issue in SQLite version 3.7.15. Great if it is solved in the > latest version. > Fixed for 3.7.16 by check-in http://www.sqlite.org/src/info/99127a669c -- D. Richard Hipp d...@sqlite.org

Re: [sqlite] Sqlite accepts invalid column names

2013-06-24 Thread Rob Golsteijn
> On Thu, Jun 20, 2013 at 10:26 AM, Rob Golsteijn > wrote: > > > > > SELECT a.col2, > >b.col2, > >a.b.col2,-- invalid column name > >b.a.col2,-- invalid column name > >a.a.col2,-- invalid column name > >

Re: [sqlite] Fine tuning SQLite performance with WAL mode

2013-06-24 Thread Runcy Oommen
Hello simon et al, Just an update that I managed to switch to WAL successfully and was able to observe a performance improvement of about 2%. This was less than what was anticipated but atleast something is better than nothing!   I also have another question which is related along the same