Re: [sqlite] OR in virtual tables

2007-02-16 Thread Jos van den Oever
2007/2/16, Dan Kennedy <[EMAIL PROTECTED]>: I think with a virtual table all you can do is: SELECT * FROM vtable WHERE x = 'a' UNION SELECT * FROM vtable WHERE x = 'b' Virtual tables cannot supply an index for WHERE clauses of the form "x IN ('a', 'b')" or "x = 'a' OR x = 'b'" the way norm

Re: [sqlite] OR in virtual tables

2007-02-16 Thread Dan Kennedy
I think with a virtual table all you can do is: SELECT * FROM vtable WHERE x = 'a' UNION SELECT * FROM vtable WHERE x = 'b' Virtual tables cannot supply an index for WHERE clauses of the form "x IN ('a', 'b')" or "x = 'a' OR x = 'b'" the way normal tables can. Dan. On Fri, 2007-02-16 at

[sqlite] OR in virtual tables

2007-02-15 Thread Jos van den Oever
Hi All, I'm playing with virtual tables and found that when i do SELECT * FROM vtable WHERE x = 'a' OR x = 'b' xBestIndex is called without constraints. Is there a way to circumvent this? I dont want sqlite to traverse all the rows just because of the OR statement. The version I'm using is 3.3.13