Re: Real vs Int performance - Mailing list pgsql-performance

From Shaun Thomas
Subject Re: Real vs Int performance
Date
Msg-id 4D418177.1040401@peak6.com
Whole thread Raw
In response to Re: Real vs Int performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Real vs Int performance
List pgsql-performance
On 01/27/2011 08:18 AM, Tom Lane wrote:

> Not if you can persuade the client-side code to output integers as
> integers.  "numeric" type is orders of magnitude slower than integers.

I sadly have to vouch for this. My company converted an old Oracle app
and they changed all their primary keys (and foreign keys, and random
larger int fields) to NUMERIC(19)'s. I've convinced them all new stuff
should be BIGINT if they need that level of coverage, but the damage is
already done.

I'm not sure about orders of magnitude on the storage/index side, but my
tests gave us a 10% boost if just the keys are switched over to INT or
BIGINT.

--
Shaun Thomas
OptionsHouse | 141 W. Jackson Blvd. | Suite 800 | Chicago IL, 60604
312-676-8870
sthomas@peak6.com

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email

pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: Real vs Int performance
Next
From: "Kevin Grittner"
Date:
Subject: Re: Why I lost the last pg_xlog file?