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

CHECK vs REFERENCES

From: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
To: pgsql-performance(at)postgresql(dot)org
Subject: CHECK vs REFERENCES
Date: 2005-09-10 03:23:19
Message-ID: 20050910001821.E1170@ganymede.hub.org (view raw or flat)
Thread:
Lists: pgsql-performance
Which is faster, where the list involved is fixed?  My thought is that 
since it doesn't have to check a seperate table, the CHECK itself should 
be the faster of the two, but I can't find anything that seems to validate 
that theory ...

The case is where I just want to check that a value being inserted is one 
of a few possible values, with that list of values rarely (if ever) 
changing, so havng a 'flexible list' REFERENCED seems relatively overkill 
...

Thoughts, or pointers to a doc that disproves, or proves, what I believe?

Thanks ...

----
Marc G. Fournier           Hub.Org Networking Services (http://www.hub.org)
Email: scrappy(at)hub(dot)org           Yahoo!: yscrappy              ICQ: 7615664

Responses

pgsql-performance by date

Next:From: Michael FuhrDate: 2005-09-10 03:49:07
Subject: Re: CHECK vs REFERENCES
Previous:From: Christopher Kings-LynneDate: 2005-09-09 07:00:23
Subject: Re: Too slow query, do you have an idea to optimize?

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