database design - MySQL architecture optimization - MySQL cluster -
I am working on a web application with the following structure: We have "customers" and each of these Near the self is "those". Each customer (with their users and other data) gets completely separated from others and there is no shared data between them. Apart from this, each 'Customer' has a separate sub-website and all queries coming from there (by or by its users) will always refer to the same customer.
The database is created in the following way:
create tab 'customer' (`id` int (11) unsigned null integration) = engine; Tab 'User' (`ID` entry (11) Non-signed faucet AUTACACArtment, 'CustomerID' (11 unsigned) Create Engine = INODB; Tablet 'BlogPost' (`ID` int (11) signed faucet AUTONCRR,` User ID` encrypted (11) unsigned) Engine = InDebbi; I have several tables like 'Tablepost' which are connected to the customer from the customer.
A common query will be of this type:
'blogpost' from the SELECT * BP Inner Join 'user' UBP.USIRID = Where is UID .customerID = 324 It is worth noting that they are similar and are really unnecessary - because we enter a sub-website, we are only interested in data that is special Customer is connected to
So the question is how can I improve the database? The more I read on this topic and I'm confused - is there a way to go to the NDB (MySQL cluster) Storage Engine? Is it better to create many different databases - one for each customer? Maybe adding an unnecessary customer ID field to blog post ? Some other thoughts? Mogodibi ?!
Allows to clear the first NDB engine, not the way to go to MySQL cluster / NDB, here Only this will help in your situation which does not provide anything, it actually makes it more complicated not only will you need a serious amount of resources and at least 3 database servers such as JOINS Still not good within the NDB? Just do not go there.
There is nothing wrong in joining the tables, RDBMS is designed to do this efficiently. If you are joining an index on foreign key then it will be both fast and efficient. What you are trying to do here is that the vast majority of web databases work with every day and most of them are simultaneously reporting Are included in.
You can go to a DB per customer, but believe me, this will greatly increase your database administration work and if you do not really want to go down this avenue for business reasons, So this is a nightmare when the schema changes and when there are performance related problems in Customer X, but Customer Y does not.
Comments
Post a Comment