Re: [pgsql-advocacy] MySQL to PostgreSQL, was ENUM type

From: Gregory Youngblood <pgcluster(at)netio(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Chris Travers <chris(at)travelamericas(dot)com>, Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, "Jim C(dot) Nasby" <decibel(at)decibel(dot)org>, PostgreSQL advocacy <pgsql-advocacy(at)postgresql(dot)org>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: [pgsql-advocacy] MySQL to PostgreSQL, was ENUM type
Date: 2005-07-28 04:57:57
Message-ID: A0715BCA-96F8-401C-B1C6-DEB9E952690D@netio.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-general


On Jul 27, 2005, at 9:53 PM, Tom Lane wrote:

> Gregory Youngblood <pgcluster(at)netio(dot)org> writes:
>
>> ... the problem is unsigned bigint in mysql to postgresql.
>> There's not another larger integer size that can be used that would
>> allow the 18446744073709551615 (is that the max value?) max value
>> available in mysql. Or am I missing something?
>>
>
> You'd have to translate that to NUMERIC, which would work but would
> take a bit of a performance hit ...

The most common places I've seen unsigned bigint used have been
primary keys for tables where the counter is expected to basically
grow forever. I've also seen it used to store unique user id numbers
instead of varchar fields. In both of those cases, the number is used
as a key, either alone or with another field, in an index. Would
there be much of a performance hit for that type of use? I can image
the biggest performance hit being mathematical calculations, such as
sum(), etc. Or would the performance hit be across the board?

Greg

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Tom Lane 2005-07-28 06:40:15 Re: [GENERAL] MySQL to PostgreSQL, was ENUM type
Previous Message Tom Lane 2005-07-28 04:53:07 Re: [GENERAL] MySQL to PostgreSQL, was ENUM type

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-07-28 05:54:47 Re: Upgrading from 7.1
Previous Message Tom Lane 2005-07-28 04:53:07 Re: [GENERAL] MySQL to PostgreSQL, was ENUM type