Questions about PHP simulated circle of friends data, such as A circle of friends with N comments
When A user enters the circle of friends to refresh the latest 10 items, for example, each circle of friends has N comments, the data calculation formula to be called is R = (A * N) * 10.
My problem is: this method of data retrieval puts a lot of pressure on the database. it takes the first time for the database to be fully retrieved, but the circle of friends is short so fast. please kindly advise.
Reply to discussion (solution)
Databases are also used, but not relational databases, but memory-based NOSQL databases.
Relational databases are based on hard disks, and the speed is naturally slower.
Therefore, the speed is burned out by money.
Query method? I still want to query 10 friends first and then query the comments in each circle of friends in sequence?
Relational databases are based on hard disks, and the speed is naturally slower.
Therefore, the speed is burned out by money.
Query method? I still want to query 10 friends first and then query the comments in each circle of friends in sequence?
Yes!
This is where key-value pairs are queried.
In fact, it is slower than the associated query, but the carrier is different, it seems faster
Yes!
This is where key-value pairs are queried.
In fact, it is slower than the associated query, but the carrier is different, it seems faster
Thank you. in addition to improving the performance of nosql and hardware, what other methods can be used to increase the query speed in the language itself?
No!
Of course, the premise is that you have adopted the speed-up suggestions provided by the database (or prove invalid)
No!
Of course, the premise is that you have adopted the speed-up suggestions provided by the database (or prove invalid)
Thank you.