Skip to main content

Posts

Showing posts from February, 2019

Performance tuning PostgreSQL - Basic query tuning concepts

There is no any hard-and-fast rule for query tuning or server tuning. All are depend on your business requirement(logic) and H/W capacity. If all you are on Linux, your total physical RAM should be larger than your database size on disk in order to minimize I/O. Eventually if the entire database will be in the OS read cache and I/O will be limited to committing changes to disk.  This blog is divided into two parts. In this part, I am writing on some basic ideas related to improve query performance. In second part I‘ll write on Server parameter setting concepts. There are some points we have to take care when we write any query.   1. Limits your data when you are joining(using) a table in many times in a SQL query(SP). Example, suppose we have a table XYZ in this table we have millions of records and more than 50 columns and this table XYZ are used many times in SQL query and we need only 5 to 10 columns on the basis of some condition. Then it is always better to cre...