Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using postgres db with django app. I created two daemon process out of it, one is used for scheduling some tasks(APScheduler) and other one is to dump events into database subscribing them via zmq, and I am using thread pool in python scripts for the db dumping function(also using transaction.autocommit decorator to commit my transactions). But as I am checking cpu load, many of the select statements are running and each statement consuming 30-40% of cpu load, causing too much cpu load. On the other side, scheduling task daemon generating "idle in transaction warning". How could I resolve both problems.

share|improve this question

closed as not a real question by voretaq7 Nov 9 '12 at 2:45

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
There's not enough information here for anyone to help you -- At the very least we'd need to know something about your queries and DB structure. Consider asking on Database Administrators with the necessary details... –  voretaq7 Nov 9 '12 at 2:46
    
Now reposted on dba here: dba.stackexchange.com/q/28415/7788 –  Craig Ringer Nov 9 '12 at 7:00
add comment