3 ms·
Postgres 10 introduced native table partitioning and it became much easier to use in postgres 11. This will let you divide large tables into smaller ones that c
by malyk 7y ago
Postgres 10 introduced native table partitioning and it became much easier to use in postgres 11. This will let you divide large tables into smaller ones that can be queried more efficiently
Rails 6 introduced multiple databases natively in activerecord. You can more easily have read only databases or segment off high write workloads.
Foreign tables are a way to allow bringing in data from multiple databases into one so it “looks” like everything is in a single db. This got better/faster, particularly with joins in postgres 12.
Also consider things like materialized views or even plain views which can help bring together just the right data you need ahead of time.
Just a couple options off the top of my head.
- durkie 7y agoThanks! Partitioned and foreign tables look quite interesting -- I'm at the point where I need to scale the database compute load (with write access) across many nodes, but coordinating those nodes has seemed challenging with rails. And yeah I can probably lean on views a bit more to save some search time for point/line-in-polygon operations.