[sqlite] batch or one by one?

2015-12-17 Thread 王庆刚
Testing shows that sqlite3_get_table is faster than sqlite3_prepare_v2 and sqlite3_step together. In fact. At 2015-12-17 14:48:18, "Igor Tandetnik" wrote: >On 12/16/2015 11:24 PM, ??? wrote: >> There is an interesting phenomenon.As you know, SQLite can retrieve >> records by batch or

[sqlite] batch or one by one?

2015-12-17 Thread Simon Slavin
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

[sqlite] batch or one by one?

2015-12-17 Thread 王庆刚
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

[sqlite] batch or one by one?

2015-12-17 Thread Stephan Beal
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

[sqlite] batch or one by one?

2015-12-17 Thread Igor Tandetnik
On 12/17/2015 2:04 AM, ??? wrote: > Testing shows that sqlite3_get_table is faster than sqlite3_prepare_v2 and > sqlite3_step together. In fact. You must be doing something wrong in your test harness. You are likely measuring something other than actual SQLite performance. Show your code. --

[sqlite] batch or one by one?

2015-12-17 Thread Igor Tandetnik
On 12/16/2015 11:24 PM, ??? wrote: > 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. If you

[sqlite] batch or one by one?

2015-12-16 Thread Scott Robison
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