Slow trigger on identical DB but different machine - Mailing list pgsql-general

From Etienne Labuschagne
Subject Slow trigger on identical DB but different machine
Date
Msg-id 1142580580.8577.12.camel@integer
Whole thread Raw
Responses Re: Slow trigger on identical DB but different machine  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: catch SELECT statement return
Next
From: Bruno Wolff III
Date:
Subject: Re: Constraint Question