News for hackers. Stuff that matters.
Re:Sysadmin mistakes start-ups make by gstar on Tuesday October 20, 2009 @08:04PM (#893647)
That -is- fast, but I still have trouble reconciling that deep down in my computer, a human readable SQL query gets built, and then another process parses that SQL. Seems so wasteful building and then parsing a human readable string for something that's happening on the same machine.

I know nothing of SQLites's internals, but wouldnt it make more sense to parse the query once and then store a compiled version of the query for subsequent lookups? Like you might do with a regexp?

Re:Sysadmin mistakes start-ups make by azim on Tuesday October 20, 2009 @08:46PM (#893693)
Yes, This is known as a prepared statement. You compile a parametrized statement once, then execute it as many times as you like with different arguments.

Also, SQLite, unlike most other databases, is an embedded database which does everything in-process rather than invoking multiple processes.