Re: Performance problems with arithmetic operators - Mailing list pgsql-general

From Thomas Lockhart
Subject Re: Performance problems with arithmetic operators
Date
Msg-id 3BA8A878.965A4839@fourpalms.org
Whole thread Raw
In response to Performance problems with arithmetic operators  (Mark Johnathan Greenaway <mark@commsecure.com.au>)
List pgsql-general
> Has anyone else experienced serious performance problems when using arithmetic
> expressions in queries?
...
> a and b are numeric(10, 3)

numeric() is implemented with binary coded decimal representation, which
is substantially slower than direct processor supported math involving
just ints and floats. Try testing this with different types to see what
happens.

                       - Thomas

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Performance question (stripped down the problem)
Next
From: "Roderick A. Anderson"
Date:
Subject: Re: read in to psql from file