Dominique Devienne wrote: > select * from some_table where some_column in (...) > > 2) In other places we synthesize the query text by splicing list.join(", ") > in the in (list) where clause. > > Both solutions are unsatisfactory, because ... 2) constantly reparse and > prepare queries, which can get super long if the array to "bind" is big. > > Any chance SQLite would add true array binding?
The compiled statement depends on the number of elements, so SQLite would have to reprepare anyway: > .explain on > explain select 1 in (111,222,333); addr opcode p1 p2 p3 p4 p5 comment ---- ------------- ---- ---- ---- ------------- -- ------------- ... 8 Integer 111 3 0 00 9 MakeRecord 3 1 4 b 00 10 IdxInsert 1 4 0 00 11 Integer 222 3 0 00 12 MakeRecord 3 1 4 b 00 13 IdxInsert 1 4 0 00 14 Integer 333 3 0 00 15 MakeRecord 3 1 4 b 00 16 IdxInsert 1 4 0 00 ... Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users