(no title)
Lex-2008 | 2 months ago
i.e. something like this: CREATE INDEX idx_events_type ON events(json_extract(data, '$.type'))?
i guess caveat here is that slight change in json path syntax (can't think of any right now) can cause SQLite to not use this index, while in case of explicitly specified Virtual Generated Columns you're guaranteed to use the index.
pkhuong|2 months ago
fny|2 months ago
It's pretty fragile...
Basically anything that alters the text of an expression within the where clausejohnmaguire|2 months ago
paulddraper|2 months ago
You need to ensure your queries match your index, but when isn’t that true :)
0x457|2 months ago
When you write another query against that index a few weeks later and forget about the caveat, that slight change in where clause will ignore that index.
WilcoKruijer|2 months ago
> The ability to index expressions was added to SQLite with version 3.9.0 (2015-10-14).
So this is a relatively new addition to SQLite.
debugnik|2 months ago
unknown|2 months ago
[deleted]
Lex-2008|2 months ago