How in php to know whether there are changes in the database without constant monitoring?

Now I have a script that every few seconds checks for any changes in the table and if Yes then change view-shku. How can I do this without the constant queries?
March 12th 20 at 08:11
4 answers
March 12th 20 at 08:13
March 12th 20 at 08:15
Queues and websocket.
March 12th 20 at 08:17
request simple ?
explain how to evaluate its complexity ?
works in milliseconds ?

if Yes, then let them climb in base.
March 12th 20 at 08:19
We should aim at change data in the database is displayed in the view.
1. Add a task to update the view function to the queue script (database/file).
2. After you have added - just pull the trigger add a new task to get the script to work up a full analysis of the queue.
3. If the data is similar/the same type, it can be any number of tasks in the queue to be considered for one (merge) and after the execution - clear all the tasks before the time of the call to the current trigger (because at the time of the script may have some more tasks in the queue!).

Once the queue is empty, the script exits. It will be launched again at the next trigger event (p.2).

Find more questions by tags PHP