Recently, at work, we were facing performance issues with our database queries. As the databse grew to millions of records in a short time, querying even a small segment of data was taking so much time. There was an urgent need to improve the query execution time.
For instance, the query execution on a massive table took around 60s as follows.
1 | ashkeys=> explain analyze select * from massive_table; |
With the following update to the postgresql.conf file, the performance improved a lot since the postgres had a lot of memory to work with \O/.
1 | #------------------------------------------------------------------------------ |
With above configurations, postgres executed the same query a lot more better.
1 | ashkeys=> explain analyze select * from massive_table; |
P.S: It only increases the performance to some point and does not guarantee super speed execution. Mind your relations in the relational carefully ^_^