Trigger is the way to go. André. Date: Mon, 23 Aug 2010 11:42:21 -0700 Subject: Triggers or code? From: dm.aeqa@xxxxxxxxx To: pgsql-performance@xxxxxxxxxxxxxx Hello There, I have a table x and a history table x_hist, whats the best way to update the history table. should i need to use triggers or embed a code in my script to update the history table? what is the performance impact of a trigger versus embedding the code in the script? thanks for your time. - Deepak |