Slow trigger on identical DB but different machine

From: Etienne Labuschagne <elabuschagne(at)agileworks(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Slow trigger on identical DB but different machine
Date: 2006-03-17 07:29:40
Message-ID: 1142580580.8577.12.camel@integer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2006-03-17 08:01:59 Re: Constraint Question
Previous Message Bruno Wolff III 2006-03-17 07:01:07 Re: catch SELECT statement return