Considering the below query,
select * from sub_test df, jsonb_array_elements(json_data) jba where (jba->>'name')::text = 'SubYear' and (jba->>'value')::numeric > '2050';
There are about 500+ keys such as "name" as mentioned in the above query in the json_data JSONB type column. I would need to make a comparison against a specific year. Should individual index be created for all the available keys or how to handle such queries to make use of index scan?
Kindly help to clarify.