Adding 'Optimizing PostgreSQL settings' sub-section.
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 54s
All checks were successful
Deploy Greenlight API / deploy (push) Successful in 54s
This commit is contained in:
19
README.md
19
README.md
@@ -182,3 +182,22 @@ _A panic typically means something went unexpectedly wrong. Mostly we use it to
|
||||
|
||||
For most applications this performance difference simply isn't something that you need to worry about. In real terms, we're talking about a few thousandths of a millisecond - and the improved readability of responses is probably worth this trade-off.
|
||||
But if your API is operating in a very resource-constrained environment, or needs to manage extremely high levels of traffic, then this is worth being aware of, and you may prefer to stick with using **json.Marshal()** instead.
|
||||
|
||||
#### Optimizing PostgreSQL settings
|
||||
|
||||
The default settings that PostgreSQL ships with are quite conservative, and you can often improve the performance of your database by tweaking the values in your **postgresql.conf** file.
|
||||
|
||||
You can check where your **postgresql.conf** file lives with the following SQL query :
|
||||
|
||||
``` postgresql
|
||||
$ sudo -u postgres psql -c 'SHOW config_file;'
|
||||
----------------------------------------------
|
||||
/etc/postgresql/15/main/postgresql.conf
|
||||
(1 row)
|
||||
```
|
||||
|
||||
To read more about PostgreSQL optimization :
|
||||
https://www.enterprisedb.com/postgres-tutorials/how-tune-postgresql-memory
|
||||
|
||||
To generate suggested values based on your available system hardware, you can use :
|
||||
https://pgtune.leopard.in.ua
|
||||
Reference in New Issue
Block a user