· 2 min · Django

Getting the ID of Related Objects in Django

Stop fetching entire rows to grab a foreign key you already have, and let the database handle iteration instead of your app.

6 comments

· 1 min · Security

Why I run qmail

A critical root exploit in Exim is spreading—but the developers patched it months ago. Keep your mail server updated.

0 comments

· 3 min · Django

Comparing NULLs Considered Silly

NULL doesn't behave like you think it does. Nullable primary keys are meaningless, NULL values can't be joined, and NULL = NULL returns NULL—not true.

3 comments

· 1 min · Django

Using Server-Side PostgreSQL Cursors in Django

Use psycopg2's server-side cursors in Django to stream enormous result sets without loading them into memory.

2 comments

· 8 min · Django

Very Large Result Sets in Django using PostgreSQL

Django's QuerySet caching and default fetch behavior can silently consume gigabytes of memory on large result sets.

9 comments

· 1 min · PostgreSQL

Waiting for psycopg2.3: NamedTuples

Stop writing result[4]—psycopg2.3 beta now lets you fetch query results as named tuples with intuitive dot notation.

2 comments

· 2 min · PostgreSQL

Small PostgreSQL Installations and 9.0 Replication

PostgreSQL 9.0's streaming replication will be a game-changer for small businesses managing critical data—finally making high availability something a casual…

2 comments

· 2 min · PostgreSQL

Users Want Functionality, Not Features

Users claim they don't need replication—until they lose a day's data.

7 comments

· 1 min · PostgreSQL

Things I Do Not Understand: “Web-Scale.”

What does "web scale" actually mean? Let's move past the marketing speak and pin down some numbers for what constitutes truly high-volume database performance.

5 comments

· 3 min · Django

Django and PostgreSQL “Idle In Transaction” Connections

Django connections pile up in "Idle in Transaction" state because it skips COMMIT for read-only queries. Here's why it happens and how to fix it.

10 comments