On 03/12/06, Tom Lane <[EMAIL PROTECTED]> wrote:
"Michael Guyver" <[EMAIL PROTECTED]> writes:
> ... Running the array_append version is faster by at least one order of
> magnitude in these examples.

Really?  I see only about a 50% advantage (155 msec vs 105 msec) in both
8.1 and 8.2.  What PG version are you running?  What database encoding
are you using?

Hi Tom,

Thanks for taking the time to have a look at this. Perhaps I
overstated the case when I said an order of magnitude :¬O  That said,
however, I'm fairly sure that the difference was more than you've
seen.

The hardware may indeed have been a factor - I was running psql 8.1 on
a laptop (AMD 64 3200, 1GB RAM, 5400rpm HDD) so the difference in
performance may have been more pronounced. I will check the figures
when I next get to my laptop at home, but I'm currently doing silly
hours at work for the release we have this week.

From some fairly unscientific bodging I've found that a mixture of the
two is the most performant, as I mentioned in a previous post.
Incidentally using a RETURN NEXT statement where I previously employed
an array_append performed as well if not slightly better than my
previous approach. Any thoughts?

Cheers

Michael

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org/

Reply via email to