On Wed, Dec 16, 2015 at 9:24 PM, ??? <2004wqg2008 at 163.com> wrote:

> hi,all
>
>      There is an interesting phenomenon.As you know, SQLite can retrieve
> records by batch or one by one.
>      1.Retrieve by batch such as sqlite3_get_table.
>      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?
>

1. Given that the get table method converts everything to a string, is a
legacy interface, and is not recommended for new use, probably prepare and
step assuming you don't use functions that will force datatype conversions.

2. It's incredibly simple to compile a little test apps with each option
and time them to know for certain in your environment, since if there are
differences it might depend on your schema, your hardware, your operating
system ... who knows what.

-- 
Scott Robison

Reply via email to