On Wed, Aug 13, 2014 at 9:25 AM, Nathaniel Trellice <napt...@yahoo.co.uk>
wrote:

> Dear list members,
>
> I'm trying to extract the results of a query that returns fairly large
> amounts of data (100-200Mb) as quickly as possible using the c/c++ api.
>
> Is there any way to avoid unnecessarily duplicating the data coming from
> the following functions?
>
>  const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
>  const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
>
> I need access to the results of these functions beyond subsequent calls to
> sqlite3_step().
>
> Or is this duplication unavoidable?
>

The duplication is unavoidable for the scenario you describe.

However, if you have large strings or BLOBs and you want to avoid needless
copying of the content, you can use the Incremental Blob I/O routines (
http://www.sqlite.org/c3ref/blob_open.html) to accomplish that with a
minimum of copying.



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to