Answer the question
In order to leave comments, you need to log in
How to build a database structure on a weak server?
The situation is this, there is a server, but due to its small characteristics, constant drops occur.
This is all due to my constant requests to the database
. Since I understand that frequent access to the database is bad, I ask you for advice
. There is a "post", after it is created, it is created table with comments to it
There is a "user", after registration of which a table with his posts is also created, etc., etc.
So, there are too many tables, it seems that this is not good
. Do you know how I sample comments on a post ?
I check the entire database by key (id and something unique in general, post number, for example)
I get the same unique key from this table and start searching the entire database for a table with comments
. Do you think this is normal?
Or is there some simpler and less demanding way?
I heard about the tables in which the keys for the tables are located, dig in this direction?
Answer the question
In order to leave comments, you need to log in
You are doing everything right. It's only a question of whether you're using indexing; how many comments and articles you have on your site.
In a good way, everything should work fine for you, and somehow you can only improve performance extensively (buying a more powerful server)
There is a "post", after its creation, a table is created with comments to it
There is a "user", after registration of which a table is also created
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question