Optimizing Query for Distinct Key-Value Pairs in a JSONB Column with LATERAL
I have a table called objects
with a jsonb
column, and I’m trying to run a query to get distinct key-value pairs from the JSON data. Currently, I’m using the following query: