Comment

Peter Bengtsson

The whole database is about 35GB. That one table, with the JSON blobs, is about 3GB.

But, I can think of some simple optimizations I could do, which is to use the ORM to make the SQL for me, but to not dress it up in and an ORM model instance.

Parent comment

Łukasz Biały

Wouldn't it make sense to optimize caching in psql first (3gb db is something psql could keep in mem all the time easily) and then measure the ORM overhead + drop ORM on the hot path and replace it with plain sql DAO? You essentially *could* get a huge perf boost without increasing your data layer complexity I think.