Skip to content

Comment on Using Postgres Arrays in Djangoparent

Comments

Really you should never have a toss up between a many-to-many join and an array in your schema. The right place to use an array would be a case where you were dealing with a one-to-many join with a trivial entity that probably shouldn't be an entity.

That said, arrays are also terribly useful in computation. There are lots of vector operations that really don't make sense on a result set, but that PostgreSQL can compute very efficiently if presented with an array.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.