Re: Deleting vs foreign keys

Поиск
Список
Период
Сортировка
От WireSpot
Тема Re: Deleting vs foreign keys
Дата
Msg-id b2d4b0380510250245u491f71d7m925eeb00cf7c3e29@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Deleting vs foreign keys  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Deleting vs foreign keys  (WireSpot <wirespot@gmail.com>)
Список pgsql-general
On 10/25/05, Martijn van Oosterhout <kleptog@svana.org> wrote:
> BTW, have you considered TRUNCATE? (although it may not work with
> foreign keys).

It doesn't :)

"TRUNCATE cannot be used if there are foreign-key references to the
table from other tables. Checking validity in such cases would require
table scans, and the whole point is not to do one."

Besides, emptying entire tables never happens, there's just selective
deletes from the "master" table.

Thanks for the tip, guys. I'll go punch in some indexes and I'll be
back to report how much of a difference it made.

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

Предыдущее
От: Csaba Nagy
Дата:
Сообщение: Re: Deleting vs foreign keys
Следующее
От: "Zlatko Matic"
Дата:
Сообщение: Re: [ANNOUNCE] PostgreSQL 8.1 Beta 4