Re: NUMERIC type benchmarks - CORRECTED - Mailing list pgsql-hackers

From Mark Butler
Subject Re: NUMERIC type benchmarks - CORRECTED
Date
Msg-id 3ADA3C43.A0752822@middle.net
Whole thread Raw
In response to Re: NUMERIC type efficiency problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: NUMERIC type benchmarks - CORRECTED  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Mario Weilguni wrote:

> I tested that on a similar configuration (P-III 450) and got the same
> results. When the addition is removed from the loop and replaced with a
> simple assignment, the total execution time goes down to ~6.5 seconds. That
> means that the modified numeric is nearly twice as fast, sure worth
> considering that.

I am embarrassed to admit I had an undeleted overloaded function that caused
me to time the wrong function.  The correct numbers should be:

Postgres PL/PGSQL original numeric:    14.8 seconds
Postgres PL/PGSQL modified numeric:    14.0 seconds
Postgres PL/PGSQL float8:              10.7 seconds
GNU AWK:                                2.5 seconds
Oracle PL/SQL number:                   2.0 seconds

This means that Tom Lane was absolutely right - for the current numeric type
implementation, palloc() overhead is not a dominant concern.  A serious
solution needs to change the internal format to use a larger base, as Tom
suggested.

- Mark Butler


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Fast Forward (fwd)
Next
From: Mark Butler
Date:
Subject: Int64 (long long) Supporting Compiler Requirement Status?