| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
|---|---|
| To: | Bruno Wolff III <bruno(at)wolff(dot)to> | 
| Cc: | Rod Taylor <pg(at)rbt(dot)ca>, Ulrich Wisser <ulrich(dot)wisser(at)relevanttraffic(dot)se>, gnari <gnari(at)simnet(dot)is>, Postgresql Performance <pgsql-performance(at)postgresql(dot)org> | 
| Subject: | Re: insert | 
| Date: | 2004-08-13 18:01:59 | 
| Message-ID: | 25254.1092420119@sss.pgh.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-performance | 
Bruno Wolff III <bruno(at)wolff(dot)to> writes:
>   Rod Taylor <pg(at)rbt(dot)ca> wrote:
>> It is likely that you are missing an index on one of those foreign key'd
>> items.
> I don't think that is too likely as a foreign key reference must be a
> unique key which would have an index. I think the type mismatch
> suggestion is probably what the problem is.
I agree.  It is possible to have a lack-of-index problem on the
referencing column (as opposed to the referenced column), but that
normally only hurts you for deletes from the referenced table.
> The current solution is to make the types match. In 8.0.0 it would probably
> work efficiently as is, though it isn't normal for foreign keys to have a type
> mismatch and he may want to change that anyway.
8.0 will not fix this particular issue, as I did not add any numeric-vs-int
comparison operators.  If we see a lot of complaints we could think
about adding such, but for 8.0 only the more common cases such as
int-vs-bigint are covered.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Huxton | 2004-08-13 19:23:52 | Re: Weird Database Performance problem! | 
| Previous Message | Josh Berkus | 2004-08-13 18:01:52 | Re: Reiser4 |