Background​

As you may have already realized, a PostgreSQL server or any SQL server in general is a "relatively" complicated story. The reason for that is basically that the server with the planner tries to replace you as a human. In ISAM you have the data model in mind, also the requirements of the system regarding which data is needed when. In the code you write all this down and have a highly specialized but also high performance system - in a ideal world of course.


With a SQL Server the code writing is done by the planner and optimizer which take your SQL statement and then plans the ISAM operations. The hardware is considered, the costs of a table read, a table scan, an index search, an index scan are taken into account. Your data distribution is also a part of the optimization process. Do you store different, similar or identical information in your records or indices. For those who are interested, EXPLAIN ANALYZE before a SQL SELECT e.g. does not provide a result but a rough plan the server has calculated to get the data.

How to configure​

In a nutshell, if the PostgreSQL server configuration is not correctly tuned to the hardware then the server can: a.) do not create correct plans and everything goes slower b.) the server cannot fully utilize the hardware and may run into so-called race conditions (recognizable when the performance in the course of an operation sequence (e.g. upsize) becomes slower and slower).

The first measure is therefore to adjust the configuration, there is a tool that at least does the basic work here: https://pgtune.leopard.in.ua

The configuration parameters are changed in the file postgresql.conf, this file can be found in the data directory of the server. For the changes to take effect, the server must be restarted, i.e. Services -> PostgreSQL -> Restart.