Re: insert

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: insert
Дата
Msg-id 25254.1092420119@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: insert  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-performance
Bruno Wolff III <bruno@wolff.to> writes:
>   Rod Taylor <pg@rbt.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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Pierre-Frédéric Caillaud
Дата:
Сообщение: Re: fsync vs open_sync
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Reiser4