Re: [sqlite] Any performance penalty for SELECTing more columns? (C API)

2016-10-17 Thread Hick Gunter
e] Any performance penalty for SELECTing more columns? (C API) In a simple SELECT query of a single table, using the C API, is there any difference in performance for requesting more or fewer columns of the table in the result? Or is the performance penalty only incurred when actually reading the

Re: [sqlite] Any performance penalty for SELECTing more columns? (C API)

2016-10-15 Thread Simon Slavin
On 15 Oct 2016, at 7:34pm, Jens Alfke wrote: > I do, actually, which is why I asked. One of the columns is a blob holding a > JSON document that can be arbitrarily large. It sounds like including this > column in the SELECT clause will cause the entire blob to be read from

Re: [sqlite] Any performance penalty for SELECTing more columns? (C API)

2016-10-15 Thread Dominique Pellé
Jens Alfke wrote: > In a simple SELECT query of a single table, using the C API, > is there any difference in performance for requesting more or > fewer columns of the table in the result? Or is the performance > penalty only incurred when actually reading the column values?

Re: [sqlite] Any performance penalty for SELECTing more columns? (C API)

2016-10-15 Thread Clemens Ladisch
Jens Alfke wrote: > What if I’ve enabled memory-mapping? In that case will the register > merely point to where the blob data is mapped into memory This would not work because the data might not be in consecutive pages. (The database file format was not designed for memory mapping.) Regards,

Re: [sqlite] Any performance penalty for SELECTing more columns? (C API)

2016-10-15 Thread Jens Alfke
> On Oct 15, 2016, at 11:10 AM, Clemens Ladisch wrote: > > In practice, this does not matter unless you have large strings/blobs > that must be read from overflow pages. I do, actually, which is why I asked. One of the columns is a blob holding a JSON document that can be

Re: [sqlite] Any performance penalty for SELECTing more columns? (C API)

2016-10-15 Thread Clemens Ladisch
Jens Alfke wrote: > is there any difference in performance for requesting more or fewer > columns of the table in the result? Or is the performance penalty only > incurred when actually reading the column values? During the sqlite3_step() call, all values in the SELECT clause are copied into

[sqlite] Any performance penalty for SELECTing more columns? (C API)

2016-10-15 Thread Jens Alfke
In a simple SELECT query of a single table, using the C API, is there any difference in performance for requesting more or fewer columns of the table in the result? Or is the performance penalty only incurred when actually reading the column values? For example, lets say a table has 26