On Thu, Mar 5, 2015 at 7:45 PM, Richard Hipp <drh at sqlite.org> wrote:

> On 3/5/15, Mike Nicolino <mike.nicolino at centrify.com> wrote:
> > I'm using System.Data.SQLite version 1.0.95.0 and have what appears to
> be a
> > bug with Virtual Tables.  Queries using 'like' in the where clause are
> not
> > getting the like clause passed to BestIndex as a query constraint.
> > Specifically:
> >
> >
> > -          Simple query: select * from foo where name like 'a%'
>
> The LIKE operator can be overridden by the application to mean
> anything the application wants - it is not compelled to follow
> standard SQL semantics.  For that reason, virtual tables are unable to
> optimize using LIKE since they have no way of knowing what it will do.
>
> Works as designed.
>

Sure. But SQLite knows whether LIKE is overriden by the application or not,
so shouldn't it only hide LIKE from the virtual table when it detects it,
instead of wholesale preventing the vtable from optimizing the "normal
semantic" LIKE case? My $0.02. --DD

Reply via email to