Skip site navigation (1) Skip section navigation (2)

Re: Performance of DOMAINs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Wheeler <david(at)kineticode(dot)com>
Cc: PostgreSQL Performance List <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Performance of DOMAINs
Date: 2006-06-21 20:08:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
David Wheeler <david(at)kineticode(dot)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

In response to


pgsql-performance by date

Next:From: Alex TurnerDate: 2006-06-21 20:46:15
Subject: Quick question about top...
Previous:From: Merlin MoncureDate: 2006-06-21 19:49:04
Subject: Re: Big array speed issues

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group