On 17 Dec 2015, at 4:24am, ??? <2004wqg2008 at 163.com> wrote: > 1.Retrieve by batch such as sqlite3_get_table.
As the documentation says, please do not use sqlite3_get_table(). It was written a long time ago and better calls are now available. "This is a legacy interface that is preserved for backwards compatibility. Use of this interface is not recommended." You may use sqlite3_exec() instead if you want. > 2.Retrieve one by one such as sqlite3_prepare_v2 and sqlite3_step > together. > Using the above two methods to retrieve hundreds of records by random, > which method is fast? As the documentation says sqlite3_get_table() is a wrapper around sqlite3_exec(). In other words it calls sqlite3_exec() and does some other things. So it cannot be faster than sqlite3_exec(). sqlite3_exec() is a wrapper around sqlite3_prepare_v2(), sqlite3_step(), and sqlite3_finalize(). In other words it calls those routines and does some other things. So it cannot be faster than they are. Simon.