pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Wheeler <david@kineticode.com>
Cc: PostgreSQL Performance List <pgsql-performance@postgresql.org>
Subject: Re: Performance of DOMAINs
Date: Wed, 21 Jun 2006 16:08:16 -0400
Message-ID: <15919.1150920496@sss.pgh.pa.us> (raw)
In-Reply-To: <54D833BE-A58F-47B8-B070-2AEDC0802468@kineticode.com>
References: <54D833BE-A58F-47B8-B070-2AEDC0802468@kineticode.com>

David Wheeler <david@kineticode.com> writes:
> Didn't see anything in the archives, so I thought I'd ask: has anyone  
> done any work to gauge the performance penalty of using DOMAINs?

There are some reports in the archives of particular usage patterns
where they pretty much suck, because GetDomainConstraints() searches
pg_constraint every time it's called.  We do what we can to avoid
calling that multiple times per query, but for something like a simple
INSERT ... VALUES into a domain column, the setup overhead is still bad.

I've been intending to try to fix things so that the search result can
be cached by typcache.c, but not gotten round to it.  (The hard part,
if anyone wants to tackle it, is figuring out a way to clear the cache
entry when needed.)

			regards, tom lane



view thread (8+ messages)  latest in thread

Message-ID: <15919.1150920496@sss.pgh.pa.us>
Permalink:  ../15919.1150920496@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/15919.1150920496@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david@kineticode.com
  Subject: Re: Performance of DOMAINs
  In-Reply-To: <15919.1150920496@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox