Parameterized Query Pegs the DB

Поиск
Список
Период
Сортировка
От Michael Daines
Тема Parameterized Query Pegs the DB
Дата
Msg-id 3B704C911550A340BE8731F1331016D505C0C72356@exchange01.tor.rapid7.com
обсуждение исходный текст
Список pgsql-general

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@rapid7.com) immediately.

В списке pgsql-general по дате отправления:

Предыдущее
От: Manoj Govindassamy
Дата:
Сообщение: PG synchronous replication and unresponsive slave
Следующее
От: Kirill Müller
Дата:
Сообщение: Re: Enumeration of tables is very slow in largish database