0

Good morning! 

I have a web application connected to a postgres database in Ubuntu.  I have the problem that there is a process within my database which consumes 100% of the CPU time. 

How can I locate that process, how can I identify the query or trigger that initiates this process? 

Thank you very much for your time.

sqlab
  • 6,412
  • 1
  • 14
  • 29
  • Try printing all DB queries to a log file and check which one is shooting the cpu usage. you probably need to consider optimise the queries for better performance. – Aditya Sep 29 '14 at 12:29
  • How I can print all my sql database to run? And I can also see the time and memory used by each query? – user4091160 Sep 29 '14 at 12:43
  • This might be related to DB locks, You can write a log file, create text file in which you print the query that your piece of code will be firing and evaluate the performance independently by connecting to DB. Check if you can optimise such sql queries. It might be related to DB locks! – Aditya Sep 30 '14 at 08:22

0 Answers0