Re: How much slower are numerics?

From: Douglas McNaught <doug(at)mcnaught(dot)org>
To: CSN <cool_screen_name90001(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How much slower are numerics?
Date: 2005-10-21 23:01:08
Message-ID: m2y84mqxu3.fsf@Douglas-McNaughts-Powerbook.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

CSN <cool_screen_name90001(at)yahoo(dot)com> writes:

> Another thing I've always wondered about ;), as I use
> numerics far more than floats. From the docs:
>
> "However, arithmetic on numeric values is very slow
> compared to the integer types, or to the
> floating-point types"
>
> How much slower are numerics? And why (I guess it has
> to do with potentially different sizes)?

Integer and floating-point arithmetic are done in hardware. NUMERIC
is done in software, and is variable size (as you note). I would
guess that the difference in speed is at least an order of magnitude.

-Doug

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2005-10-21 23:14:53 Re: How much slower are numerics?
Previous Message Jim C. Nasby 2005-10-21 22:56:43 Re: Number of rows of a table