Home > Backend Development > PHP Tutorial > How to optimize the database part when using SSE to push messages?

How to optimize the database part when using SSE to push messages?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-03-03 10:30:02
Original
1512 people have browsed it

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?

Reply content:

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.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template