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.
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.