Re: numeric data type?

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: "John D(dot) Burger" <john(at)mitre(dot)org>
Cc: PostgreSQL-general general <pgsql-general(at)postgresql(dot)org>
Subject: Re: numeric data type?
Date: 2006-01-23 15:17:22
Message-ID: 20060123151722.GA2185@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jan 23, 2006 at 09:48:52AM -0500, John D. Burger wrote:
> I have a (only vaguely) related question about NUMERICs. I'm using
> someone else's schema to copy data from their DB into mine. They use
> NUMERIC quite a bit, with scale 0, where I would use one of the integer
> types. My question is whether joining and matching on NUMERIC is
> likely to be slower than, say, INTEGER. Note that I'm never doing math
> with these values, they are just IDs.

Yes, it's will be slower. Whether it's noticable... it depends on how
often you do it. The question is really, do you need to use numeric?
Will you be multiplying large numbers, do you expect decimals when you
divide, etc. Decide your answer to that before deciding about
performance issues.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2006-01-23 16:01:15 Re: RAID 5 and postgresql
Previous Message John D. Burger 2006-01-23 14:48:52 Re: numeric data type?