Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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




TIL. Are MySQL and Postgres this fragile too?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: