Re: How to do faster DML

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: How to do faster DML
Дата
Msg-id CAKFQuwYGomKiqUcTwg==vDKY1-3K++jLZhYWcU0zkTaF91CkcQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: How to do faster DML  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Ответы Re: How to do faster DML
Список pgsql-general
On Thu, Feb 15, 2024 at 4:31 PM Peter J. Holzer <hjp-pgsql@hjp.at> wrote:
On 2024-02-14 22:55:01 -0700, David G. Johnston wrote:
> On Tuesday, February 13, 2024, veem v <veema0000@gmail.com> wrote:
>
>     float data types rather than numeric. This will give better performance.
>
>
>  Only use an inexact floating-point data type if you truly understand what you
> are getting yourself into.  Quickly getting the wrong answer isn’t tolerable
> solution.

Do NOT assume that a decimal type (even if it can grow to ridiculuous
lengths like PostgreSQL's numeric) is exact in the mathematical sense.
It isn't. It cannot represent almost all real numbers

That is an unusual definition for exact, I wouldn't have considered the requirement to represent all real numbers to be included in it.

What you see with an exact type is what you get, which allows for implementing equality, unlike inexact which requires epsilon checking.  That you need to round some values to the nearest exact value is true but doesn't make represented values less exact.  But yes, numbers in computers are complicated and require attention to use.  But not having to worry about epsilon is still a win.

David J.

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

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: PostgreSQL DB in prod, test, debug
Следующее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Using a Conversion Table