logoalt Hacker News

fnylast Friday at 4:12 PM1 replyview on HN

> slight change in json path syntax (can't think of any right now) can cause SQLite to not use this index

It's pretty fragile...

    --  Just changing the quoting
    select * from events where json_extract(data, "$.type") = 'click';

    -- Changing the syntax
    select * from events where data -> '$.type' = 'click';
Basically anything that alters the text of an expression within the where clause

Replies

johnmaguirelast Friday at 6:18 PM

TIL. Are MySQL and Postgres this fragile too?