pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Horst Dehmer <horst.dehmer@gmail.com>
To: Claudio Freire <klaussfreire@gmail.com>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Insert performance for large transaction with multiple COPY FROM
Date: Sat, 12 Jan 2013 23:41:53 +0100
Message-ID: <0E6B7417-72C9-42A3-86F9-A080ADCFB2C7@gmail.com> (raw)
In-Reply-To: <CAGTBQparVsrQkLJ2di=NHKvdXgdVxPEePMaN=s=GkRxrvFx_kg@mail.gmail.com>
References: <78A65A52-C49D-4CA4-9A63-1F5F120BC7E7@gmail.com>
	<CAGTBQpavK111WhRZYk1pfRsv3ixn-VnQKD1EZbbD=Yg-y4pZ+Q@mail.gmail.com>
	<9F5056DC-8089-40A5-8D41-508EADC63A09@gmail.com>
	<CAGTBQparVsrQkLJ2di=NHKvdXgdVxPEePMaN=s=GkRxrvFx_kg@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

The types referenced by the foreign keys are the same Numeric(20). 
Since the complete schema (of about 300 tables) is generated, I will just try char(20) instead of numeric(20) in the next days to see if it makes any difference. Which I somehow doubt. 

But first I'm following the lead of the tables/indexes iostats given by Jeff.


obj_item_loc references the following three tables and there should be no surprises.

CREATE UNLOGGED TABLE loc
(
  loc_id numeric(20,0) NOT NULL, 
...
  CONSTRAINT loc_pkey PRIMARY KEY (loc_id),
…
)

CREATE UNLOGGED TABLE obj_item
(
  obj_item_id numeric(20,0) NOT NULL, 
...
  CONSTRAINT obj_item_pkey PRIMARY KEY (obj_item_id),
…
)

CREATE UNLOGGED TABLE rptd
(
  rptd_id numeric(20,0) NOT NULL, 
...
  CONSTRAINT rptd_pkey PRIMARY KEY (rptd_id),
…
)


On 12.01.2013, at 23:18, Claudio Freire <klaussfreire@gmail.com> wrote:

> On Sat, Jan 12, 2013 at 5:16 PM, Horst Dehmer <horst.dehmer@gmail.com> wrote:
>> Yes, the ids is something I don't like either.
>> They carry additional semantics, which I cannot make go away.
>> How are chances char(20) is more time efficient than numeric(20)?
>> Disk space is no problem here.
> 
> What are the other tables like then?
> 
> The exact data types involved are at issue here, so it matters.



-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (12+ messages)  latest in thread

Message-ID: <0E6B7417-72C9-42A3-86F9-A080ADCFB2C7@gmail.com>
Permalink:  ../0E6B7417-72C9-42A3-86F9-A080ADCFB2C7@gmail.com/
Also on:    postgresql.org/message-id/0E6B7417-72C9-42A3-86F9-A080ADCFB2C7@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: horst.dehmer@gmail.com, klaussfreire@gmail.com
  Subject: Re: Insert performance for large transaction with multiple COPY FROM
  In-Reply-To: <0E6B7417-72C9-42A3-86F9-A080ADCFB2C7@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox