Re: [sqlite] [EXTERNAL] Re: sqlite3_bind_text() and WHERE x IN (?)

2018-12-06 Thread Dominique Devienne
On Thu, Dec 6, 2018 at 12:12 PM Hick Gunter wrote: > The cost of the first query plan is therefore O(a * b * (m + log n)) or > O(a *b *m) + O(a * b * log n) > The cost of the second query plan is only O(log n + m * (log a + log b)) > or O((log a*b) * m) + O(log n) > > This makes the second query

Re: [sqlite] [EXTERNAL] Re: sqlite3_bind_text() and WHERE x IN (?)

2018-12-06 Thread Hick Gunter
-Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Dominique Devienne Gesendet: Donnerstag, 06. Dezember 2018 11:32 An: General Discussion of SQLite Database Betreff: Re: [sqlite] [EXTERNAL] Re: sqlite3_bind_text() and WHERE x I

Re: [sqlite] [EXTERNAL] Re: sqlite3_bind_text() and WHERE x IN (?)

2018-12-06 Thread Dominique Devienne
On Thu, Dec 6, 2018 at 11:10 AM Hick Gunter wrote: > Maybe someone can come up with a CTE that works for this... > How so? I'm not following you. Ryan already provided a CTE to transform a string into values, but that involves string parsing, and is kinda ugly (no offence Ryan :) ), and

Re: [sqlite] [EXTERNAL] Re: sqlite3_bind_text() and WHERE x IN (?)

2018-12-06 Thread Hick Gunter
: Re: [sqlite] [EXTERNAL] Re: sqlite3_bind_text() and WHERE x IN (?) On Thu, Dec 6, 2018 at 8:49 AM Hick Gunter wrote: > ... which is what SQLite does internally if you provide a list of > literal values inside the parentheses. > Which is IMHO a pity that there's no API to bind such an

Re: [sqlite] [EXTERNAL] Re: sqlite3_bind_text() and WHERE x IN (?)

2018-12-06 Thread Dominique Devienne
On Thu, Dec 6, 2018 at 8:49 AM Hick Gunter wrote: > ... which is what SQLite does internally if you provide a list of literal > values inside the parentheses. > Which is IMHO a pity that there's no API to bind such an ephemeral table and 'bind" it. Heck, given how the carray() eponymous vtable

Re: [sqlite] [EXTERNAL] Re: sqlite3_bind_text() and WHERE x IN (?)

2018-12-05 Thread Hick Gunter
to force a different query plan -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von James K. Lowden Gesendet: Mittwoch, 05. Dezember 2018 19:04 An: sqlite-users@mailinglists.sqlite.org Betreff: [EXTERNAL] Re: [sqlite