From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: CHECK vs REFERENCES |
Date: | 2005-09-10 13:06:27 |
Message-ID: | 20050910130627.GA45586@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Sat, Sep 10, 2005 at 01:03:03AM -0300, Marc G. Fournier wrote:
> On Fri, 9 Sep 2005, Michael Fuhr wrote:
> >INSERT INTO test_check SELECT 1 FROM generate_series(1, 100000);
> >INSERT 0 100000
> >Time: 3492.344 ms
> >
> >INSERT INTO test_fk SELECT 1 FROM generate_series(1, 100000);
> >INSERT 0 100000
> >Time: 23578.853 ms
>
> Yowch, I expected CHECK to be better ... but not so significantly ... I
> figured I'd be saving milliseconds, which, on a busy server, would add up
> fast ... but not 10k' of milliseconds ...
Results will differ depending on the table structure: if you're
indexing ten columns and have five triggers then the foreign key
check will have less of an overall impact.
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Dilger | 2005-09-11 07:43:18 | performance discrepancy indexing one column versus two columns |
Previous Message | Chris Browne | 2005-09-10 05:21:09 | Re: please comment on cpu 32 bit or 64 bit |