cm0002@lemmy.world to Programmer Humor@programming.dev · 2 months agoGood Morningexternal-linkmessage-square56linkfedilinkarrow-up1824arrow-down15cross-posted to: programmerhumor@lemmy.ml
arrow-up1819arrow-down1external-linkGood Morningcm0002@lemmy.world to Programmer Humor@programming.dev · 2 months agomessage-square56linkfedilinkcross-posted to: programmerhumor@lemmy.ml
minus-squarejubilationtcornpone@sh.itjust.workslinkfedilinkarrow-up41·edit-22 months agoWhat’s that? Did you say you needed an RDBMS that can also handle JSON data? Well have I got good news for you!
minus-squareDerpgon@programming.devlinkfedilinkarrow-up12arrow-down1·2 months agoMysql / Mari can handle it too! Just use BLOB 🤣
minus-squarelime!@feddit.nulinkfedilinkEnglisharrow-up28·2 months agopg can actually query into json fields!
minus-squareTanoh@lemmy.worldlinkfedilinkarrow-up14·2 months agoAnd you can add indexes on those JSON fields too!
minus-squareTja@programming.devlinkfedilinkarrow-up7·2 months agoKind of. I hope you don’t like performance…
minus-squarejubilationtcornpone@sh.itjust.workslinkfedilinkarrow-up2·2 months agoThe 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.
minus-squareTja@programming.devlinkfedilinkarrow-up2·2 months agoQuite well is very subjective. It’s much slower than columns or specialized databases like MongoDB.
minus-squareTanoh@lemmy.worldlinkfedilinkarrow-up1·2 months agoSure, 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!
minus-squarelime!@feddit.nulinkfedilinkEnglisharrow-up4·2 months agooh i didn’t know that. iirc postgres easily beats mongo in json performance which is a bit embarrassing.
minus-squareDerpgon@programming.devlinkfedilinkarrow-up1·2 months agoHoly, never knew, and never would expect. Postgres truly is king.
What’s that? Did you say you needed an RDBMS that can also handle JSON data? Well have I got good news for you!
Mysql / Mari can handle it too! Just use BLOB 🤣
pg can actually query into json fields!
And you can add indexes on those JSON fields too!
Kind of. I hope you don’t like performance…
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.
Quite well is very subjective. It’s much slower than columns or specialized databases like MongoDB.
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!
Mysql can too, slow af tho.
oh i didn’t know that. iirc postgres easily beats mongo in json performance which is a bit embarrassing.
Holy, never knew, and never would expect. Postgres truly is king.