top | item 47028987

(no title)

jspash | 14 days ago

Omit the key and store it in a single json column. The worst of all worlds!

discuss

order

nextaccountic|13 days ago

If the json has a natural key, you can add a json index pointing to it, at least in postgres. But this will probably have worse performance characteristics than adding a separate key column.

Also natural keys suck - if a bugged json comes with repeated key (or no key at all) you will be unable to save it to process it further (well unless you have a separate table to save them). Also some jsons won't be keyed

But storing something with no index at all is probably okay if you don't plan to query much (or if the dataset is tiny)