Answer the question
In order to leave comments, you need to log in
How to find bottleneck?
There is an application on a flask, data in Postgresql. What is the general approach to speed it up? How to analyze what takes more time in the application itself?
But how to find how to speed up the execution of queries in postgres? (the settings for the current hardware are optimal - an experienced admin set up and, accordingly, optimization should be at the application level).
And yet - it is not clear why the server has so many resources - the processors are not all at the maximum, and there are a bit of operatives - although the clients are already starting to fall off.
Answer the question
In order to leave comments, you need to log in
1. Enable slow-log in PostgreSQL.
2. View the top of the slowest and most frequent queries, EXPLAIN, see if there are not enough indexes, maybe something more tricky.
3. Clients can fall off when all connections to postgres are clogged. I don’t see any other options - to watch the application logs, in fact, I should write something at this moment.
PS. At the application level, optimization - should execute more optimal queries.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question