We have a cartesian product and currently we are storing in a single table and this table is growing drastically and user can perform update and read operations on these entities and we have a soft delete when user deletes the record. And now we are getting hit by performance issues for read and update operations. Basically this cartesian product holds permissions for different roles and categories.
Wanted to know if anyone came across the similar situation and understand the best practices to store the cartesian product.
I was also thinking to split this into N table and then write and update individually for each type and then while reading perform a join.
So what are the best practices to store a cartesian product.