this post was submitted on 18 Jul 2025
819 points (99.4% liked)

Programmer Humor

26390 readers
1790 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] derpgon@programming.dev 11 points 2 months ago (1 children)

Mysql / Mari can handle it too! Just use BLOB ๐Ÿคฃ

[โ€“] lime@feddit.nu 28 points 2 months ago (2 children)

pg can actually query into json fields!

[โ€“] Tanoh@lemmy.world 14 points 2 months ago (1 children)

And you can add indexes on those JSON fields too!

[โ€“] Tja@programming.dev 7 points 2 months ago (2 children)

Kind of. I hope you don't like performance...

[โ€“] jubilationtcornpone@sh.itjust.works 2 points 2 months ago (1 children)

The performance is actually not bad. You're far better off using conventional columns but in the one off cases where you have to store queryable JSON data, it actually performs quite well.

[โ€“] Tja@programming.dev 2 points 2 months ago

Quite well is very subjective. It's much slower than columns or specialized databases like MongoDB.

[โ€“] Tanoh@lemmy.world 1 points 2 months ago

Sure, if you use a field often it is most likely better to extract it into a column with auto-updates from the JSON data.

But you have to tune it and see what is best for your use case. Just saying that you can add indexes to JSON fields as well!

[โ€“] derpgon@programming.dev 3 points 2 months ago (1 children)
[โ€“] lime@feddit.nu 4 points 2 months ago (1 children)

oh i didn't know that. iirc postgres easily beats mongo in json performance which is a bit embarrassing.

[โ€“] derpgon@programming.dev 1 points 2 months ago

Holy, never knew, and never would expect. Postgres truly is king.