Category Archives: Databases

Optimizing Django ORM / Postgres queries using left join

For the latest project I’m working on, we’re using Django with Postgres. I was writing some code that had to find a list of objects that weren’t processed yet. The way they were stored in the DB is like so: … Continue reading

Posted in Databases, Optimization | Tagged , , , , , | 1 Comment


A short while ago, I had to research some API for a company I’m consulting for. This API yields very good quality data, but isn’t comfortable enough to process it for further research. The obvious solution was to dump this … Continue reading

Posted in Databases, Programming | Tagged , , , , , | 1 Comment

A Simple Race-Condition

Lately, I’ve mostly been working on my startup. It’s a web-application, and one of the first things I’ve written was a cache mechanism for some lengthy operations. Yesterday, I found a classic race-condition in that module. I won’t present the … Continue reading

Posted in Databases, Design, Programming | Tagged , , , , , | 14 Comments

Actual Data Always Needs To Be Explicit

This might seem obvious, but it wasn’t to me it first. Now I consider it a database design rule of thumb, or even a patten. I’ll explain using an example. Consider an application where you also need automatic tagging of … Continue reading

Posted in Databases, Design, Programming, startup | Tagged , , | Leave a comment

Database Design Problem

A few weeks ago, I had to work out a database design for my startup. I had a bit of a hard time deciding on a design direction, but after thinking about it, I settled on a design I was … Continue reading

Posted in Databases, Design, startup | Tagged , , , , , , | 5 Comments