On 05/11/2011 14:46, Brandon Phelps wrote: > > With the method you outlined will I notice any huge performance > impacts? The application would be parsing incoming data from another > 3rd party application and could, at times, be executing the function in > very fast succession, although never twice at the exact same moment > (single threaded application, pending events will just block until > they're up). I honestly don't know... your best bet would be to benchmark and see. I'd guess that any changes to the code within the function would have less effect than local conditions - disk I/O, processor speed, etc. AIUI, putting your code into a function has the advantage that the Potgres only has to load pl/pgsql and parse the function once for any given connection, and then the plan is reused for all subsequent invocations coming from that connection. If the function is only going to be called once per connection, then you have the overhead of loading pl/pgsql each time it is called, on top of parsing the function; so you might be better off trying to do this outside of a function altogether. Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@xxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general