Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tu9m5-0002xc-Db for pgsql-performance@arkaria.postgresql.org; Sat, 12 Jan 2013 22:42:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tu9m4-0006aZ-Tu for pgsql-performance@arkaria.postgresql.org; Sat, 12 Jan 2013 22:42:00 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tu9m4-0006aB-2H for pgsql-performance@postgresql.org; Sat, 12 Jan 2013 22:42:00 +0000 Received: from mail-we0-f179.google.com ([74.125.82.179]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tu9m2-0008Cc-Ek for pgsql-performance@postgresql.org; Sat, 12 Jan 2013 22:41:59 +0000 Received: by mail-we0-f179.google.com with SMTP id r6so1469039wey.10 for ; Sat, 12 Jan 2013 14:41:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:mime-version:subject:from:in-reply-to:date :cc:content-transfer-encoding:message-id:references:to:x-mailer; bh=MXwRAksBv0a/au6UAUmCaGs/iGYxCoEeuaM2cNGWNvc=; b=tzpEldQXTEUNbicbqkWm4x/iLnnNAQvBPbaj7yC6eJkAuEXepebnjnueSnmsEkCKQO JMnrHTrqy9opWiYt7kM9Y/KbQc426mve/QqO51mbdGC8+T5su3HarytrhAV7Y5HfKsIB PgVruTiPIXtmBf2ZzDQCgkB/yS4CdGnyfo9Xbzb7y0E9HvgBxp57SB49GUODASzabYMT 0SkMzj/XSJVBUPvLxVmt69UU3yYKAndt9i0w6HMM/LbygfVXCIrBbbQ0GIoDkz7I3ejm GEROjFbk4h1rsydoDISDPkjDETvBhbZwvheRzMZn2J3gFdlSAsGZQiw6OJKs9RDRnqUh +SkQ== X-Received: by 10.180.103.136 with SMTP id fw8mr5524104wib.27.1358030517081; Sat, 12 Jan 2013 14:41:57 -0800 (PST) Received: from [192.168.1.77] (10.Red-79-154-233.dynamicIP.rima-tde.net. [79.154.233.10]) by mx.google.com with ESMTPS id hu8sm5771233wib.6.2013.01.12.14.41.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Jan 2013 14:41:56 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Subject: Re: Insert performance for large transaction with multiple COPY FROM From: Horst Dehmer In-Reply-To: Date: Sat, 12 Jan 2013 23:41:53 +0100 Cc: postgres performance list Content-Transfer-Encoding: quoted-printable Message-Id: <0E6B7417-72C9-42A3-86F9-A080ADCFB2C7@gmail.com> References: <78A65A52-C49D-4CA4-9A63-1F5F120BC7E7@gmail.com> <9F5056DC-8089-40A5-8D41-508EADC63A09@gmail.com> To: Claudio Freire X-Mailer: Apple Mail (2.1499) X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org The types referenced by the foreign keys are the same Numeric(20).=20 Since the complete schema (of about 300 tables) is generated, I will just t= ry char(20) instead of numeric(20) in the next days to see if it makes any = difference. Which I somehow doubt.=20 But first I'm following the lead of the tables/indexes iostats given by Jef= f. obj_item_loc references the following three tables and there should be no s= urprises. CREATE UNLOGGED TABLE loc ( loc_id numeric(20,0) NOT NULL,=20 ... CONSTRAINT loc_pkey PRIMARY KEY (loc_id), =85 ) CREATE UNLOGGED TABLE obj_item ( obj_item_id numeric(20,0) NOT NULL,=20 ... CONSTRAINT obj_item_pkey PRIMARY KEY (obj_item_id), =85 ) CREATE UNLOGGED TABLE rptd ( rptd_id numeric(20,0) NOT NULL,=20 ... CONSTRAINT rptd_pkey PRIMARY KEY (rptd_id), =85 ) On 12.01.2013, at 23:18, Claudio Freire wrote: > On Sat, Jan 12, 2013 at 5:16 PM, Horst Dehmer wr= ote: >> 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. >=20 > What are the other tables like then? >=20 > The exact data types involved are at issue here, so it matters. --=20 Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance