On Mon, Jan 04, 2010 at 04:53:16AM -0800, Yan Cheng Cheok wrote: > From general point of view, having 3 SQL statement wrapped in a > single stored procedure shall perform better due to reduced overhead > to communicate with SQL server. Is that true? Or that is my false > assumption? I'd be tempted to put them into a stored procedure/function. Less round trips to server, plan can be cached, and easier code maintenance. You also get the option of tightening up security, functions can be defined as "security definer" and permissions on original tables reduced. -- Sam http://samason.me.uk/ -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general