DEV Community

Discussion on: How does database indexing of Arrays work?

Collapse
 
camdenclark profile image
Camden Clark

Not clear what you mean by this. Are you asking how arrays as column values in relational databases are indexed? I think it depends on the specific relational database and what types of queries it supports on array values.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

I think the answer is usually one-to-many relationships.

However, I am not sure if JSON or JSONB columns in PostGRES can be indexed. (That is, no Foreign keys needed.)