Re: Proposal: TRUNCATE TABLE table RESTRICT

Поиск
Список
Период
Сортировка
От Mike Mascari
Тема Re: Proposal: TRUNCATE TABLE table RESTRICT
Дата
Msg-id 394576EB.3254904B@mascari.com
обсуждение исходный текст
Ответ на Re: Proposal: TRUNCATE TABLE table RESTRICT  (JanWieck@t-online.de (Jan Wieck))
Ответы Re: Proposal: TRUNCATE TABLE table RESTRICT
Список pgsql-hackers
Jan Wieck wrote:
> 
> Mike Mascari wrote:
> > Sorry to ask for another favor, but what does Oracle do here? If
> > a referring table has 1,000,000 rows in it which have been
> > deleted but not vacuumed, what would the performance implications
> > be?
> 
>     Referential integrity has no performance impact on VACUUM. If
>     that's what you aren't sure about.
> 
> Jan

Actually, I was worried that if TRUNCATE were to vist all
referring tables to determine whether or not it was empty, rather
then just issuing an elog() at the first RI trigger encountered,
that it might wind up scanning a 1,000,000 tuple relation (the
referring relation) where all the rows have been marked as
deleted before determining that its okay to perform the TRUNCATE.
I was hoping that Oracle simply disallowed TRUNCATE on tables
with referring relations, regardless of whether or not there was
actually any data in them, so that PostgreSQL could do the same.
:-)

Mike Mascari


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: PostgreSQL 7.0.2-2 RPMset available.
Следующее
От: Don Baccus
Дата:
Сообщение: Re: Proposal: TRUNCATE TABLE table RESTRICT