Thanks for mentioning test_intarray! I'm now considering rewriting parts of
our code because sqlite3_intarray_bind is more powerful than using sequences
like ?,?,?...

A question: does using a virtual table (or precisely virtual table from
test_intarray) affect query optimizer? We have lots of tables in our DB, and
queries with lots of joins, so we quite depend on ANALYZE results and the
optimizer. 

For example, where we now have a query

  SELECT ...lots-of-joins... WHERE ...lots-of-exprs... AND someColumn IN
(?,?,?,? ...40 params... )

we'd use either "AND someColumn IN vtab" or another JOIN with vtab.

I'm currently running some experiments and looking at EXPLAIN outputs, but
the results are inconclusive. 

Any hints from developers would be helpful.

Thanks!
Igor




Richard Hipp-3 wrote:
> 
> Have you looked at the "test_intarray" code.
> 
> http://www.sqlite.org/src/artifact/489edb9068bb926583445cb02589344961054207
> 
> On Sun, Jul 11, 2010 at 9:42 PM, Sam Carleton
> <scarle...@miltonstreet.com>wrote:
> 
>> Is there any way to bind to this query?
>>
>> SELECT * FROM table WHERE tableId IN ( ? );
>>
>> Where ? should be 1,2,3,4
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
> 
> 
> 
> -- 
> ---------------------
> D. Richard Hipp
> d...@sqlite.org
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/binding-an-IN-tp29135222p29163181.html
Sent from the SQLite mailing list archive at Nabble.com.

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

Reply via email to