Wout Mertens wrote: > I'm using the JSON1 extension, and I want to find items by json array > contents. > > This means a query like `SELECT foo.json FROM foo, json_each(foo.json) > WHERE json_each.value = "bar";`, so basically scanning the entire table. > > I understand that virtual tables can not be indexed, so what other > approaches would be possible here to prevent such a slow operation?
Indexes (even expression indexes) require a 'real' table. You'd have to put the results of json_each() into a separate table that can then be indexed. Or extend the JSON1 extension to do this behind the scenes. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users