4 ms·
> it would be a bit of a red flag to have large number of indeces on a flexible schema where each customer uses their own schema, embedded in a single table Ye
by 12345temp 5y ago
> it would be a bit of a red flag to have large number of indeces on a flexible schema where each customer uses their own schema, embedded in a single table
Yeah, that makes sense. The issue is that MongoDB can only shard by index, so we couldn't use a collection per user, which is why my mind went to a Postgres table per user. Can you shard by table with Postgres?
> Try out a few options to get a sense for the design. Yes, it will take a few days to spam the database and run performance tests. However, because you are making a critical design decision and doing something less-than-standard, you need to accept the extra work - or figure out how to fit into a more standard pattern.
That's great advice, thanks!