On Mon, May 08, 2006 at 04:06:33PM +1000, Bill KING wrote: > Anish Enos Mathew wrote: > > Well, currently I am doing a mobile project and we are testing the > > performance of four databases depending on the time it takes to insert > > or delete or search a particular data from the database. I am using > > sqlite3 database. I am using sqlite_exec command for doing a particular > > process in the data base. But the problem with sqlite_exec is that the > > sqlite engine should parse the select or insert statement and then > > produces the result. If we are having a low level API for doing the same > > which doesn't takes parsing time, we could directly do the process > > rather than giving the select or insert statements. So I would like to > > know is there any other method which can be used to retrieve or insert > > data's from the database other than using the select or insert commands. > > > Much better, as far as I know (which isn't much). The sql parser > generates vdbe bytecodes (see the explain command), which it then > executes to execute the query as such. You could take a squiz in that > direction.
Fair warning though: I'm pretty sure it's not a blessed interface, and can therefore subject change without advance notice (it did, after all, change significantly in the jump to 3.0). Anish, if your app is just executing one of a number of predetermined SQL queries, you may want to use sqlite3_prepare() instead, so that you pay the parsing cost just a few times rather than on every query, while retaining the flexibility and general clarity of SQL in your program. - Adrian