Re: Pulling data from a constraint def

From: "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: David Fetter <david(at)fetter(dot)org>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Pulling data from a constraint def
Date: 2010-05-13 13:28:28
Message-ID: 482E80323A35A54498B8B70FF2B8798004586FAB1D@azsmsx504.amr.corp.intel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hmmmmm.... Very Interesting idea. I';l have to try that one.

One difference that may be an issue in other apps (not mine though) might be the inability to defer constraint checking using enum. Still, enum looks very appealing. And more portable, cleaner than parsing the values out of pg_constraints.

Thanks Tom for that idea!

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Thursday, May 13, 2010 12:33 AM
To: Josh Kupershmidt
Cc: David Fetter; Gauthier, Dave; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Pulling data from a constraint def

Josh Kupershmidt <schmiddy(at)gmail(dot)com> writes:
> On Wed, May 12, 2010 at 12:58 AM, David Fetter <david(at)fetter(dot)org> wrote:
>> If you've measured a performance issue for a table that tiny, it's a
>> bug that needs fixing in PostgreSQL.  What measurements have you done
>> so far?

> Just for fun, I tried it out myself. Here are the times I got on my
> modest laptop:

> CHECK constraint:
> * 500k INSERTs: 3.8 seconds
> * 500k UPDATEs: 6.0 seconds

> Foreign Key:
> * 500k INSERTs: 18.7 seconds
> * 500k UPDATEs: 21.2 seconds

I'm surprised no one has yet suggested an ENUM type.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2010-05-13 13:44:29 Re: List traffic
Previous Message Marc G. Fournier 2010-05-13 13:27:56 Re: List traffic