How to optimize work server on postgreSQL?
To optimize queries, it is very important to understand the logic of the PostgreSQL core. I'll try to explain. In fact, everything is not so difficult. EXPLAIN outputs the information needed to understand what the kernel is doing on a given request. We will consider the output of the EXPLAIN command. For more information, I recommend that you study the article about postgresql execution plan