Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0583D1337C03 for ; Thu, 27 Jan 2011 10:18:26 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 94770-01-8 for ; Thu, 27 Jan 2011 14:18:18 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 7570C1337C10 for ; Thu, 27 Jan 2011 10:18:13 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p0REICJo021354; Thu, 27 Jan 2011 09:18:12 -0500 (EST) To: David Greco cc: "pgsql-performance@postgresql.org" Subject: Re: Real vs Int performance In-reply-to: References: <26917.1296079932@sss.pgh.pa.us> Comments: In-reply-to David Greco message dated "Thu, 27 Jan 2011 05:48:00 -0800" Date: Thu, 27 Jan 2011 09:18:11 -0500 Message-ID: <21353.1296137891@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/262 X-Sequence-Number: 42049 David Greco writes: > Right you are. Kettle is turning the number(11) field from Oracle into > a BigNumber, which is a decimal. If I cast the field into an Integer > in Kettle and keep the field an integer in Postgres, I get good > performance. Suspect the correct course of action would simply be to > make number(11) fields in Oracle numeric(11,0) fields in Postgres. Not if you can persuade the client-side code to output integers as integers. "numeric" type is orders of magnitude slower than integers. regards, tom lane