Fork me on GitHub

Am I overthinking many-to-many NxM relationships where N could be in the tens of thousands and M can be in the hundreds? Where most of the time the addition of a single M could add tens-of-thousands of rows in the table?


I mean, this is a textbook many-to-many relationship table and the various indexes will probably take care of performance considerations...


What kind of queries will be run against that table, and what is the max query time you need to support? In general your DB will handle that fine, but maybe your queries will not run sub 100ms


At least that's been my experience on Postgres


Sub 100ms queries are important. I guess I can always denormalize and use eg arrays, even automatically with triggers…