Search Postgresql Archives

Parameterized Query Pegs the DB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

 

I’ve got a situation where a user was seeing their database pegged at 100% CPU usage. We tracked it down to a parameterized query, and when we removed the process that was launching the query, it solved the problem. I still don’t understand what caused the problem, though. I’ve searched around in the old messages and FAQ and google and didn’t find anything that helped.

 

The one thing that stands out at this point is that the parameters aren’t written to the log file.

 

For other parameterized queries, the logs will look like this:

 

2011-12-02 13:33:58 MSTLOG:  duration: 0.028 ms  execute <unnamed>: SELECT COUNT(*) FROM table_name WHERE field = $1

2011-12-02 13:33:58 MSTDETAIL:  parameters: $1 = 'value'

 

But for the query that was causing a problem, there is never an “MSTDETAIL” line showing the parameters.

 

We’re using PostgreSQL 9.0 and accessing via JDBC.

 

Thanks for any help/insight you can provide.

 

msd

This electronic message contains information which may be confidential or privileged. The information is intended for the use of the individual or entity named above. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic transmission in error, please notify us by e-mail at (postmaster@xxxxxxxxxx) immediately.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux