PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND 19906 postgres 11 0 4552 4552 3792 R 0 87.3 1.7 0:55 postmaster <-- end of snippit -->
What I am doing is, via a perl script, reading about 5000 records out of the database and printing them to the screen. This process takes about 5 minutes with postmaster hogging the CPU for the duration.
What is odd is that if I then duplicate the same data on another box and run the same script there the process takes less then 30 seconds to complete. Postmaster will still hog the CPU, but it is 75% user level load, rather than system level like it is on the problematic box. (Yes, the 2 boxes are of equivalent horsepower and have the same version of linux, postgreSQL, and perl installed)
I should also mention that if I run the same query within psql I will get all the results in about 4 seconds.
Has anybody else run into this problem where postmaster seems to churn in system level calls?? Any ideas on how to fix this issue ?