Subject: [sqlite] How does indexes on exprressions work on
multi-column indexes?

Hi All

I have a following table:

create table if not exists t_expr (pid integer not null,
payload text not null)

create index if not exists t_expr_idx1 on t_expr(pid,

I have some following data like:

insert into t_expr values (1, '{'index':{'id':"xxx"},'val':xxx}')

I found out when trying to query the table using something like:

select payload from t_expr where (pid between ? and ?) and
json_extract(payload, '$')=?

the json_extract part didn't work.

Query plan indicated "search table t_expr using index pid>? and pid<?"

I want to know whether indexes on expressions works only with single column


gelin yan
sqlite-users mailing list

Programming list archiving by: Enterprise Git Hosting