Re: Pulling data from a constraint def

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: Pulling data from a constraint def
Дата
Msg-id 20100513234231.GD3460@fetter.org
обсуждение исходный текст
Ответ на Re: Pulling data from a constraint def  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Pulling data from a constraint def  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, May 13, 2010 at 12:33:08AM -0400, Tom Lane wrote:
> Josh Kupershmidt <schmiddy@gmail.com> writes:
> > On Wed, May 12, 2010 at 12:58 AM, David Fetter <david@fetter.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.

I didn't suggest it because I didn't know about it, but because I've
found ENUM to be a trap for the unwary.

Very seldom are people absolutely certain that they'll have one
particular list of things forever.  The list may grow or shrink, or
the order may change, and in those cases where the list changes
somehow, ENUM causes more problems than it solves.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

В списке pgsql-general по дате отправления:

Предыдущее
От: strk
Дата:
Сообщение: Re: current_user in seucurity DEFINER functions
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: pg_dumpall for Postgres Database Daily Backup?