Answer the question
In order to leave comments, you need to log in
How to optimize queries in PostgreSQL?
Good day.
Essence of the question: I have a server on the node, it is such a push server (tracks changes in the database and sends the necessary data to the connected client). Approximate load 1500-2000 clients. There are 7-8 requests per client per 3 seconds. Recent tests have shown that this will be a heavy load on the system, because. with 2-3 clients hanging, a regular SELECT constantly takes from 30 to 60% of the load per percent.
This, by the way, is a notification system. If someone has implemented something like this, can you give me an optimization idea?
Answer the question
In order to leave comments, you need to log in
see EXPLAIN (ANALYZE, VERBOSE, BUFFERS)
all requests.
In general, you don’t need to track changes, make triggers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question