Re: INSERT times - same storage space but more fields -> much slower inserts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Matthew Wakeling <matthew(at)flymine(dot)org>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: INSERT times - same storage space but more fields -> much slower inserts
Date: 2009-04-15 00:40:09
Message-ID: 25350.1239756009@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> writes:
> Unlike PQexecPrepared(...), binary-format COPY doesn't handle endian and
> type size issues for you. You need to convert the data to the database
> server's endianness and type sizes, but I don't think the PostgreSQL
> protocol provides any way to find those out.

The on-the-wire binary format is much better specified than you think.
(The documentation of it sucks, however.) It's big-endian in all cases
and the datatype sizes are well defined.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Brian Cox 2009-04-15 00:41:24 error updating a very large table
Previous Message Craig Ringer 2009-04-15 00:31:37 Re: INSERT times - same storage space but more fields -> much slower inserts