On Sun, Dec 03, 2006 at 11:24:36PM -0600, John Stanton wrote:
> How about running a daemon on your machine which gets the request from 
> your user defined function, does the lookup with a persistent connection 
> and asynchronously updates the row in the DB?  It does not need to be a 
> daemon, it could be a thread in your program if that is more apprpriate.
> 
> When it has a few requests answered it can deliver them in one transaction.

Clearly one can live without this feature.  It means splitting what
could be a single statement/transaction into two at the very least.

> If your async process is fed by a FIFO buffer then netwrok slowness and 
> glitches will not stop your main process.  You can optimize traffic by 
> not sending partially packets, by accumulating requests until you have a 
> full packet.  There is little value in grouping more than that, but 
> having a persistent connection is valuable.

Timeouts while holding on to a DB lock are probably the biggest problem
with batcheable functions, yes, and perhaps the best reason to say no to
them.

Thanks,

Nico
-- 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to