HN user

haki

553 karma
Posts22
Comments10
View on HN
hakibenita.com 4mo ago

Row Locks with Joins Can Produce Surprising Results in PostgreSQL

haki
3pts1
hakibenita.com 6mo ago

Unconventional PostgreSQL Optimizations

haki
431pts69
hakibenita.com 8mo ago

Reliable Django Signals

haki
2pts0
openfolder.sh 3y ago

Heroku has been running a second copy of my scheduler instance

haki
297pts128
hakibenita.com 5y ago

Practical SQL for Data Analysis: What you can do without Pandas

haki
2pts0
hakibenita.com 5y ago

New Features in Django 3.2

haki
47pts13
hakibenita.com 5y ago

An unexpected find that freed 20GB of unused index space in PostgreSQL

haki
375pts78
hakibenita.com 5y ago

Re-Introducing Hash Indexes in PostgreSQL

haki
12pts0
hakibenita.com 5y ago

Exhaustiveness Checking in Python Using Mypy

haki
2pts1
hakibenita.com 5y ago

The surprising impact of medium-size texts on PostgreSQL performance

haki
182pts16
hakibenita.com 5y ago

Simple Anomaly Detection Using Plain SQL

haki
6pts2
hakibenita.com 5y ago

Some SQL Tricks of an Application DBA

haki
5pts0
hakibenita.com 6y ago

Stop Using Datetime.now in Python

haki
2pts1
hakibenita.com 6y ago

Understand Group by in Django with SQL

haki
1pts0
hakibenita.com 6y ago

Common Mistakes and Missed Optimization Opportunities in SQL

haki
179pts66
hakibenita.com 6y ago

“Export to Excel” Almost Killed Our System

haki
2pts0
hakibenita.com 7y ago

Fastest Way to Load Data into PostgreSQL Using Python

haki
3pts0
hakibenita.com 7y ago

How We Solved a Storage Problem in PostgreSQL Without Adding Storage

haki
1pts0
medium.com 7y ago

Be careful with CTE in PostgreSQL

haki
2pts0
medium.com 8y ago

Automating the boring stuff in Django using the check framework, ast and inspect

haki
2pts0
medium.com 9y ago

How to manage concurrency in Django models

haki
3pts0
medium.com 9y ago

5 ways to make Django Admin safer

haki
1pts0

Since at least two people noticed, I would just say that the insert-select-insert approach was added later, after I took some inspiration from Django's implementation of get_or_create.

If you store large jsonb values in the database, storing them out of line may be a good thing - for example, you can query metadata much faster.

Also, worth mentioning that jsonb is only benefitial when you plan on indexing/manipulating the data in the database. Otherwise, using json type may be a better choice (smaller size, stored as text, parsed on demand)