Search Postgresql Archives

Re: COPY FROM STDIN instead of INSERT

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

 



Ron Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 10/18/06 09:47, Merlin Moncure wrote:
> > On 10/18/06, Ron Johnson <ron.l.johnson@xxxxxxx> wrote:
> >> > I tested binary quite a bit and only found it to be a win if moving
> >> > blobs in and out of the database.  On 'normal' tables of mixed fields
> >> > types of small size, it can actually be slower.  Binary is a bit
> >> > faster for native types and bytea, and slower for character types.
> >>
> >> "native types"?
> > 
> > types operated on directly by the processor. int2, int4, int8, float4,
> > and float8, and their various aliases :).
> > 
> > in short, i think using binary for anything other than bytea is a
> > waste of effort/time, except for bytea.
> 
> That's counter-intuitive, since you'd (well, I'd) think that doing a
> binary copy would be faster since the code would bypass the int-to-
> ascii conversion.

Yeah, but on the other hand it has to do the htonl/ntohl conversion.
(I'd guess that should be faster than the text-to-int anyway ...)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


[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