I am writing to you to discuss the performance problem of postgreSQL database we encountered in our project. I want to get suggestions from you.
The postgreSQL database we used need to process several millions records. There are only six tables in the database. one of them contains several million records,theOthers are less smaller. We need select more than 100 thousands records from the talbe which contains several million records in 10 seconds.In the process of selecting, the speed of selecting is not stable. Sometimes it cost 2 minutes , but sometimes 20 seconds. After analyzing the time wasting in the process, we found the speed offunction Count(*) is very slow. At the same time we have finished the setup of some parameters like max_fsm_relation, max_fsm_pages, share memory size etc, but the performance is not improved satisfied.
Under this condition, I want get some useful suggestion from you. How to optimize the database?How to improve the Count(*)? Because wewant to get the number of records in the recordsetwe got.