From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)bowt(dot)ie> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Feng Tian <ftian(at)vitessedata(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Decimal64 and Decimal128 |
Date: | 2017-06-20 16:39:11 |
Message-ID: | CA+TgmoaiGrr6zbYO9AxYfoRu4h=v+vEv1kbpcex2evdqiTNZJQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Jun 19, 2017 at 3:47 PM, Peter Geoghegan <pg(at)bowt(dot)ie> wrote:
> On Mon, Jun 19, 2017 at 12:19 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> I don't have a specific use case in mind. However, datumCopy() is
>> sure to be a lot faster when typByVal is true, and see also the
>> documentation changes in commit
>> 8472bf7a73487b0535c95e299773b882f7523463.
>
> Fair enough.
>
> I ask because at one time I informally benchmarked Postgres (using
> pgbench), where int4 (or maybe int8) primary keys were replaced with
> equivalent numeric primary keys. This was a SELECT benchmark. Anyway,
> the conclusion at the time was that it makes surprisingly little
> difference (I think it was ~5%), because cache misses dominate anyway,
> and the page layout doesn't really change (the fan-in didn't change
> *at all* either, at least for this one case, because of alignment
> considerations). I never published this result, because I didn't have
> time to test rigorously, and wasn't sure that there was sufficient
> interest.
People work pretty hard for a 5% performance improvement, so I
wouldn't dismiss that difference as nothing. However, I think the
difference would probably be larger if you were using the values for
computations (e.g. sum, avg) rather than as PKs.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Sergey Burladyan | 2017-06-20 16:40:45 | Re: Broken hint bits (freeze) |
Previous Message | Merlin Moncure | 2017-06-20 16:33:30 | postgresql transactons not fully isolated |