Search Postgresql Archives

Re: Concatenate performance question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Michael Guyver" <kenevel@xxxxxxxxxxxxxx> 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?

To a zeroth-order approximation, the two methods should have about the
same amount of data copying involved, and so the concatenation method
ought to win out based on avoiding array data structure manipulation
overhead (not to mention avoiding the array_to_string step, which makes
an extra pass over all the data).  So I find my own results surprising,
and yours very much more so ...

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux