Re: numeric data type?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: numeric data type?
Дата
Msg-id 20060123151722.GA2185@svana.org
обсуждение исходный текст
Ответ на Re: numeric data type?  ("John D. Burger" <john@mitre.org>)
Список 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@svana.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.

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: "John D. Burger"
Дата:
Сообщение: Re: numeric data type?
Следующее
От: Marcos
Дата:
Сообщение: Re: What is made a mistake with SP?