Hi, I'm developing a simple virtual table module and I've found possible misbehavior of virtual table modules when used with IN condition.
Example: select x from y where x = 3; calls (correctly) function xFilter of my vtab module with parameter 3, but select x from y where x in (3) calls xFilter without any arguments, and vtab module is not able to apply it's filtering rules, what results in degraded performance. Also in (every) EXPLAIN one can see, that vFilter op is executed _before_ actually processing IN condition: 0 Trace 0 0 0 00 NULL 1 Goto 0 31 0 00 NULL 2 VOpen 0 0 0 vt 00 NULL 3 Intege 1 1 0 00 NULL 4 Intege 0 2 0 00 NULL -- vFilter op 5 VFilte 0 29 1 00 NULL -- IN processing 6 Noop 0 0 0 00 begin I 7 If 4 15 0 00 NULL 8 Intege 1 4 0 00 NULL 9 Null 0 3 0 00 NULL 10 OpenEp 2 1 0 ke 00 NULL 11 Null 0 6 0 00 NULL 12 Intege 3 5 0 00 NULL 13 MakeRe 5 1 6 c 00 NULL 14 IdxIns 2 6 0 00 NULL 15 VColum 0 0 6 00 y.x 16 IsNull 6 28 0 00 NULL 17 Affini 6 1 0 c 00 NULL 18 NotFou 2 28 6 1 00 end IN 19 VColum 0 0 7 00 y.x 27 Result 7 8 0 00 NULL 28 VNext 0 6 0 00 NULL 29 Close 0 0 0 00 NULL 30 Halt 0 0 0 00 NULL 31 Transa 0 0 0 00 NULL 32 Verify 0 17 0 00 NULL 33 Goto 0 2 0 00 NULL Is this a feature or bug ? Thanks Sam _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users