Bruno Wolff III <[EMAIL PROTECTED]> writes: > Rod Taylor <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match