Search Postgresql Archives

Re: How to do faster DML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 15, 2024 at 4:31 PM Peter J. Holzer <hjp-pgsql@xxxxxx> wrote:
On 2024-02-14 22:55:01 -0700, David G. Johnston wrote:
> On Tuesday, February 13, 2024, veem v <veema0000@xxxxxxxxx> 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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux