On 2018/01/08 10:42 PM, Shane Dev wrote:
Hi Ryan,

Do you mean it would be more efficient to generate entries such as these
(with randomly chosen integers and running numbers) in the application and
then committing them to the database with sqlite3_exec or similar?

For a large number of entries, I assumed there would be greater overhead in
preparing and binding the values than both generating and storing them with
a single RCTE.

I more intended to suggest you generate the consecutive list of numbers in your code . SQLite has to jump through some CTE hoops to do that, but in your code it's as simple as:
i = 0;
while sqlite_step ...
  i++;
...

The random numbers would be more efficient in your code too, though it is also straight forward in SQL.


_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to