> > sqlite> explain query plan SELECT tb_file_key, basename, extension,
> > path FROM tb_file WHERE basename GLOB 'a' AND  extension GLOB 'b' AND
> >  path GLOB '*';
> > 0|0|TABLE tb_file WITH INDEX fullpath_idx
> >
> >


> SQLite will not try to optimize a GLOB (to use an index) if it doesn't
> contain wild cards -- although it probably should.
> This optimization has been added to our list for a possible future
> enhancement.
>
> As a workaround, as has been noted, you could simply use the  foo = 'b'
> instead of foo GLOB 'b'.


Is the "explain query plan" lying when it says it will use the index?
 Can I just slap a trailing "*" on the end of each parameter for it
really use the index?

Yep, I know I can modify the query, but that requires more prepared
statements, and each I'm adding extends the connect/prepare time for
my embedded system.   How I wish the SSE was still around.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to