News for hackers. Stuff that matters.
Re:File Attachments: Databases can now store files and images by refulgentis on Wednesday August 30, 2023 @06:38PM (#37330076)
Do you have any thoughts on when a JSON column is too large? I've been wondering about the tradeoffs between a jsonb column in postgres that may have values, at the extreme, as large as 10 MB, usually just 100 KB, versus using S3.
Re:File Attachments: Databases can now store files and images by xmprt on Wednesday August 30, 2023 @10:54PM (#37331918)
Wouldn't the same reasoning for BLOBs apply to JSON columns? Unless you're frequently querying for data within those columns (eg, filtering by one of the JSON fields), then you probably don't need to store all the JSON data in the DB. And even if that is the case, you could probably work out a schema where the JSON data is stored elsewhere and only the relevant fields are stored in the DB.

At the same time, I'm working with systems where we often store MBs of data in JSON columns and it's working fine so it's really up to you to make the tradeoff.

Re:File Attachments: Databases can now store files and images by bastawhiz on Saturday September 02, 2023 @04:04PM (#37365026)
If you're only querying the JSON data and not returning it in full often, it's almost certainly fine. It's the cost of transit (and parsing/serialization) that's a problem.
Re:File Attachments: Databases can now store files and images by bastawhiz on Saturday September 02, 2023 @04:03PM (#37365014)
It depends on how much you're getting back total. 100 rows returning a kb of data is the same as one row with 100kb. I get worried when the total expected data returned by a query is more than 200kb or so.