Re: [sqlite] very bad performance with triggers and indexes

2009-06-22 Thread David Jud
I did not get any answers at all, so what are my next steps? Should I submit a bug report somewhere? David -Original Message- From: David Jud Sent: Friday, June 19, 2009 12:08 PM To: 'sqlite-users@sqlite.org' Subject: very bad performance with triggers and indexes Hi I have a very

Re: [sqlite] integer primary key autoincrement & sqlite_sequence

2009-06-22 Thread Dennis Cote
Oliver Peters wrote: > > I want the "normal" user only identify himself by putting his id into > the field identity and afterwards let the system decide in what field to > put his id (INSERT = creator, UPDATE = editor). Doing this for every > record I can show who created it and who was the last

Re: [sqlite] integer primary key autoincrement & sqlite_sequence

2009-06-22 Thread João Eiras
On , Pavel Ivanov wrote: > Hi, Richard! > > Could you explain why this scenario doesn't cause infinite call cycle > of the trigger by itself? Is there some protection in SQLite which > breaks such cycles? > Many dbms forbid recursive trigger calls that modify a table that

Re: [sqlite] Interrupting sqlite

2009-06-22 Thread João Eiras
On , Dan wrote: >> My doubt is the following: if from the progress callback (set with >> sqlite3_progress_handler) I return non 0 and therefore I get >> SQLITE_INTERRUPT from the call to sqlite3_step, is the sqlite3_stmt >> object still in a valid state and will the query

Re: [sqlite] integer primary key autoincrement & sqlite_sequence

2009-06-22 Thread Oliver Peters
Am Montag, den 22.06.2009, 17:39 -0600 schrieb Dennis Cote: > Oliver Peters wrote: > > sorry: my code wasn't completely what I wanted so here again: > > > > CREATE TRIGGER IF NOT EXISTS test > > BEFORE INSERT ON "a" > > BEGIN > > INSERT INTO

Re: [sqlite] integer primary key autoincrement & sqlite_sequence

2009-06-22 Thread Dennis Cote
Oliver Peters wrote: > sorry: my code wasn't completely what I wanted so here again: > > CREATE TRIGGER IF NOT EXISTS test > BEFORE INSERT ON "a" > BEGIN > INSERT INTO a(code,name,creator) > VALUES(new."code",new."name",new."identity"); >

Re: [sqlite] integer primary key autoincrement & sqlite_sequence

2009-06-22 Thread Pavel Ivanov
Hi, Richard! Could you explain why this scenario doesn't cause infinite call cycle of the trigger by itself? Is there some protection in SQLite which breaks such cycles? Pavel On Mon, Jun 22, 2009 at 4:10 PM, D. Richard Hipp wrote: > > On Jun 22, 2009, at 3:33 PM, Oliver Peters

Re: [sqlite] integer primary key autoincrement & sqlite_sequence

2009-06-22 Thread D. Richard Hipp
On Jun 22, 2009, at 3:33 PM, Oliver Peters wrote: > Hello out there, > > > to my mind I get false entries in sqlite_sequence using this code: > > > CREATE TABLE IF NOT EXISTS a( > id INTEGER PRIMARY KEY AUTOINCREMENT, > code

Re: [sqlite] integer primary key autoincrement & sqlite_sequence

2009-06-22 Thread Oliver Peters
[...] > > The ROWID is not generated until the INSERT statement actually runs. > Hence the BEFORE trigger does not have access to it and the BEFORE > trigger sees a NULL. Change the trigger to an AFTER trigger and it > will work. > [...] > > D. Richard Hipp > d...@hwaci.com Thanks for

Re: [sqlite] integer primary key autoincrement & sqlite_sequence

2009-06-22 Thread D. Richard Hipp
On Jun 22, 2009, at 3:33 PM, Oliver Peters wrote: > Hello out there, > > > to my mind I get false entries in sqlite_sequence using this code: > > > CREATE TABLE IF NOT EXISTS a( > id INTEGER PRIMARY KEY AUTOINCREMENT, > code

[sqlite] integer primary key autoincrement & sqlite_sequence

2009-06-22 Thread Oliver Peters
Hello out there, to my mind I get false entries in sqlite_sequence using this code: CREATE TABLE IF NOT EXISTS a( id INTEGER PRIMARY KEY AUTOINCREMENT, codeVARCHAR NOT NULL, name

Re: [sqlite] sqlite3_exec unresponsive for insert, delete and update

2009-06-22 Thread Doug
I don't know anything about xcode, but I've been burned by bugs like this in the past. It was always my fault: console was connected to one DB, and my app was connected to another. Make REALLY sure you're using the database file that you think you are. Doug > -Original Message- >

Re: [sqlite] Interrupting sqlite

2009-06-22 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 João Eiras wrote: > My doubt is the following: if from the progress callback (set with > sqlite3_progress_handler) Why don't you call the main message loop from within the progress handler callback? Roger -BEGIN PGP SIGNATURE- Version: GnuPG

[sqlite] sqlite3_exec unresponsive for insert, delete and update

2009-06-22 Thread Edward Wong
hi all, i've been banging my head against the keyboard, trying to figure out what is going on. i am writing a program in xcode that uses the c/c++ sqlite3 library. the problem i am having is the following: 1. i open a connection to my db using sqlite3_open() NSString *dbFile

Re: [sqlite] Interrupting sqlite

2009-06-22 Thread Dan
On Jun 22, 2009, at 6:10 PM, João Eiras wrote: > Hello! > > I developing an single threaded app (pre-established fact, can't > change this), and to keep the UI usable, when sqlite is executing, > between multiple calls to sqlite3_step, I just break away and let the > main message loop run a bit

[sqlite] 3.6 vs 3.5

2009-06-22 Thread Rizzuto, Raymond
I was testing performance with 3.5.9 and 3.6.1 versions, which we have installed on our systems. With 3.5.9, writing 10,000 records of an int primary key and a 1k blob took 60 seconds when I specified both pragma synchronous=off; and pragma locking_mode=exclusive;. That time dropped to 1

[sqlite] Interrupting sqlite

2009-06-22 Thread João Eiras
Hello! I developing an single threaded app (pre-established fact, can't change this), and to keep the UI usable, when sqlite is executing, between multiple calls to sqlite3_step, I just break away and let the main message loop run a bit more. If the query i executing has an "order by" clause,