Slow trigger on identical DB but different machine

Поиск
Список
Период
Сортировка
От Etienne Labuschagne
Тема Slow trigger on identical DB but different machine
Дата
Msg-id 1142580580.8577.12.camel@integer
обсуждение исходный текст
Ответы Re: Slow trigger on identical DB but different machine  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi all,

I have the exact same DB on two machines.  One is a RedHat box with a
SAN for storage.  The other is a Windows XP laptop.

The RedHat box outperforms the laptop with everything (as expected)
except with a DELETE FROM query (quite unexpected).

After doing a EXPLAIN ANALYZE, it seems that a trigger (on delete)
function is causing the delay (the trigger is implemented in pgSQL).
I'm not sure how to analyze the parts "inside" the trigger to see which
operation is causing the problem.

The strange thing is that both databases are EXACTLY the same with
EXACTLY the same SQL query executed (I restore both DBs from the same
backup file to ensure that everything is the same - data and objects).
Why wouldn't the trigger cause the same problem on the Windows XP
laptop?  The RedHat machine takes about 100x longer to do the operation
than the laptop!

How can I log/analyze the operations inside a trigger and are there any
suggestions as to why the trigger would be so slow?

Any help would be greatly appreciated.

Etienne


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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: catch SELECT statement return
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Constraint Question