On Thu, Dec 17, 2015 at 8:04 AM, ??? <2004wqg2008 at 163.com> wrote: > Testing shows that sqlite3_get_table is faster than sqlite3_prepare_v2 and > sqlite3_step together. In fact. > > And uses, on average, much more memory, as it stores all rows for the query results in the result table. If your results have 10 rows, that method will use, abstractly speaking, 10x as much memory. prepare/step allows code to have a more or less constant memory usage, independent of the number of rows in the result set.
The very first line of the get_table documentation says: This is a legacy interface that is preserved for backwards compatibility. Use of this interface is not recommended. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf