Received: from sss.pgh.pa.us (sss-backup.pgh.pa.us [216.151.103.158]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fA13tJP01433 for ; Wed, 31 Oct 2001 22:55:19 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id fA13t7c15015; Wed, 31 Oct 2001 22:55:08 -0500 (EST) To: "Peter Schmidt" cc: "Sean Chittenden" , pgsql-admin@postgresql.org Subject: Re: FreeBSD upgrade causes performance degredation In-reply-to: References: Comments: In-reply-to "Peter Schmidt" message dated "Wed, 31 Oct 2001 12:20:56 -0800" Date: Wed, 31 Oct 2001 22:55:06 -0500 Message-ID: <15012.1004586906@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200110/280 X-Sequence-Number: 2524 "Peter Schmidt" writes: > Old function was something like this: > SELECT COL1 FROM TABLE WHERE COL2 = SP_FUNCTION(ARG, ARG, ARG, ...) > The query was modified so that the call to the second function was executed > as a subselect (and thereby executed only once for all rows in the first > select?): > SELECT COL1 FROM TABLE WHERE COL2 = (SELECT SP_FUNCTION(ARG, ARG, > ARG...)) This seems like a rather klugy substitute for marking the function "iscachable". You might want to read up on that in the CREATE FUNCTION documentation. I don't see why an OS change would affect this though; I think you still have more digging to do to understand the issue. Did you reinstall Postgres after the OS update, and if so is it possible you neglected to do VACUUM ANALYZE after reloading the database? regards, tom lane