Home >Backend Development >PHP Tutorial >How to optimize the database part when using SSE to push messages?
Added a new message reminder function to the old program, which can now be pushed using SSE.
In the background PHP, a query statement is directly executed to see if there is any new message, and if there is, it will be output.
Relatively small site. Mainly worried about whether the server will be under too much pressure? How to improve?
Added a new message reminder function to the old program, which can now be pushed using SSE.
In the background PHP, a query statement is directly executed to see if there is any new message, and if there is, it will be output.
Relatively small site. Mainly worried about whether the server will be under too much pressure? How to improve?
If the number of visits is not large, database query will be sufficient. If the number of visits is large, you can consider redis or the like.