pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shaun Thomas <sthomas@peak6.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Greco <David_Greco@harte-hanks.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Real vs Int performance
Date: Thu, 27 Jan 2011 08:30:15 -0600
Message-ID: <4D418177.1040401@peak6.com> (raw)
In-Reply-To: <21353.1296137891@sss.pgh.pa.us>
References: <CDFA9340E95A764E9366B4EDF3A43125BCACF7E68D@VA3DIAXVS091.RED001.local>
	<26917.1296079932@sss.pgh.pa.us>
	<CDFA9340E95A764E9366B4EDF3A43125BCACF7E9EC@VA3DIAXVS091.RED001.local>
	<21353.1296137891@sss.pgh.pa.us>

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



view thread (8+ messages)  latest in thread

Message-ID: <4D418177.1040401@peak6.com>
Permalink:  ../4D418177.1040401@peak6.com/
Also on:    postgresql.org/message-id/4D418177.1040401@peak6.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: sthomas@peak6.com, tgl@sss.pgh.pa.us, David_Greco@harte-hanks.com
  Subject: Re: Real vs Int performance
  In-Reply-To: <4D418177.1040401@peak6.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