Re: [sqlite] Slow operation

2010-10-06 Thread Simon Slavin
On 7 Oct 2010, at 1:46am, Jay A. Kreibich wrote: > Much of the big "No-SQL" movement does exactly this. > The big secret is that most of these applications are still doing > relational data operations, they're just pushing the manipulations > (such as a JOIN) down into the client code, making

Re: [sqlite] Slow operation

2010-10-06 Thread Jay A. Kreibich
On Tue, Oct 05, 2010 at 03:44:38PM +0100, Ian Hardingham scratched on the wall: > Hey Jay, thanks for your feedback. > > I am indeed using (several) delineated lists. I would very much > appreciate your input into how bad a decision this is. I hesitate to call it a bad decision, so much as it

Re: [sqlite] Slow operation

2010-10-05 Thread Ian Hardingham
Hey Jay, thanks for your feedback. I am indeed using (several) delineated lists. I would very much appreciate your input into how bad a decision this is. So, I basically need to find entrys of Table B that do not appear in that list. Obviously, it would be better to have a playedInf table and

Re: [sqlite] Slow operation

2010-10-05 Thread Jay A. Kreibich
On Tue, Oct 05, 2010 at 04:08:41AM -0700, Drake Wilson scratched on the wall: > Quoth Ian Hardingham , on 2010-10-05 11:52:36 +0100: > > I'm running this code from a scripting language bound to SQLite: > > > > %r = db.query("SELECT * FROM userTable", 0); > > %i = 0; > > > > db.que

Re: [sqlite] Slow operation

2010-10-05 Thread Ian Hardingham
Thanks again Drake, I'll investigate those alternatives. On 05/10/2010 13:52, Drake Wilson wrote: > Quoth Ian Hardingham, on 2010-10-05 12:27:38 +0100: >> CREATE TABLE IF NOT EXISTS userTable (name TEXT PRIMARY KEY NOT NULL >> UNIQUE, password TEXT NOT NULL, email TEXT, key TEXT, status TEXT, da

Re: [sqlite] Slow operation

2010-10-05 Thread Drake Wilson
Quoth Ian Hardingham , on 2010-10-05 12:27:38 +0100: > CREATE TABLE IF NOT EXISTS userTable (name TEXT PRIMARY KEY NOT NULL > UNIQUE, password TEXT NOT NULL, email TEXT, key TEXT, status TEXT, date > TEXT, playedFor INTEGER, totalScore FLOAT DEFAULT 0, totalRecord TEXT > DEFAULT '0\t0', dailySco

Re: [sqlite] Slow operation

2010-10-05 Thread Ian Hardingham
I typed the command into my console - not doing it once per row. Doing it again, it was more like one second. No other SQLite commands should have been happening near the time of execution. I'm not entirely sure what "schema" means in this context. The definiton of userTable is: CREATE TA

Re: [sqlite] Slow operation

2010-10-05 Thread Drake Wilson
Quoth Ian Hardingham , on 2010-10-05 12:16:11 +0100: > Your query, > > UPDATE userTable SET playedInfIds = '' > > Still took two seconds actually... but significantly better than what I > was doing. You're doing this only once rather than once per row, right? On a table with around 3k rows, i

Re: [sqlite] Slow operation

2010-10-05 Thread Ian Hardingham
Many thanks Drake, all of your points were highly pertinent. I'll stop lazily replying to threads and changing the subject! I indeed see that my approach was pretty bafflingly bad in highsight. I tend to do most "logic" in the scripting language as opposed to in SQLite commands as it's what

Re: [sqlite] Slow operation

2010-10-05 Thread Drake Wilson
Quoth Ian Hardingham , on 2010-10-05 11:52:36 +0100: > Hey guys. My apologies in advance if this is a slightly mundane question. (Please don't start new threads by replying to random messages. The resultant header information indicates falsely that your email is part of the same thread.) > I'

[sqlite] Slow operation

2010-10-05 Thread Ian Hardingham
Hey guys. My apologies in advance if this is a slightly mundane question. I'm running this code from a scripting language bound to SQLite: %r = db.query("SELECT * FROM userTable", 0); %i = 0; db.query("BEGIN TRANSACTION", 0); while (%i < db.numRows(%r)) { %us