Re: modifying the tbale function

From: Neil Conway <neilc(at)samurai(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Islam Hegazy <islheg(at)hotmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: modifying the tbale function
Date: 2007-03-18 22:57:57
Message-ID: 45FDC3F5.5060701@samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:
> I'm not convinced it would be a huge gain anyway. Switching madly in
> and out of the perl interpreter at least is a known performance
> problem, IIRC

Returning control to the backend for every row returned would likely be
excessive, but you could return once every k rows and get most of the
benefits of both approaches (k might be on the order of 1000). The
problem with the current approach is that it makes returning large
result sets from PL functions very expensive, since they need to be
spooled to disk.

As for using threads, that's pretty much a non-starter: we can't safely
allow calls into the backend from multiple concurrent threads, and I
doubt that will chance any time soon.

-Neil

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Islam Hegazy 2007-03-18 23:09:26 Re: modifying the tbale function
Previous Message Andrew Dunstan 2007-03-18 21:26:31 Re: modifying the tbale function