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 00:31 +0100, Jos van den Oever wrote: > 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. > Using > info->estimatedCost = 100000; > does not trigger additional calls to xBestIndex. > > Cheers, > Jos > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------