Hello,
I am developing a system to manage the sale of various real estate developments. In this system each venture has a group of units available, type "Apt 21 - 2nd Floor, Apt 34 - 3rd Floor" etc. I need performance for the broker to access a unit, see its information and even change the selling situation of that unit. Ex: from available to sold. As the same builder has several projects and I work with the same system several builders; the system has registered in the same table the units of many enterprises having a field "emprendimento_id" as identifier of which enterprise it is part to be used with filter in the sales mirror. So far so good. I previously used a "sales mirror" table with all units, but over time the amount of developments was growing, the table also started to get slow access and change information of a unit. So I started using a table for each venture. But with this difficult global sales performance queries in general and a broker sells more than one venture and with that makes it difficult to consult your sales overall since they are distributed in several tables. I have no problem creating queries to fetch the information by crossing multiple tables and gathering for the query. But I would like to know if I am correct in using one table per enterprise, or should I have left all units in the same indexed by the enterprise id?