Re: Delete query takes exorbitant amount of time

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Delete query takes exorbitant amount of time
Дата
Msg-id 20050325082101.G4358@megazone.bigpanda.com
обсуждение исходный текст
Ответ на Re: Delete query takes exorbitant amount of time  (Simon Riggs <simon@2ndquadrant.com>)
Ответы Re: Delete query takes exorbitant amount of time  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-performance
On Fri, 25 Mar 2005, Simon Riggs wrote:

> On Fri, 2005-03-25 at 10:17 -0500, Tom Lane wrote:
> > Simon Riggs <simon@2ndquadrant.com> writes:
> > > I vote to make this an ERROR in 8.1 - I see little benefit in allowing
> > > this situation to continue.
> >
> > Other than spec compliance, you mean?  SQL99 says
> >
> >             ... The declared type of each referencing column shall be
> >             comparable to the declared type of the corresponding referenced
> >             column.
> >
> > It doesn't say that it has to be indexable, and most definitely not that
> > there has to be an index.
>
> specs at dawn, eh?
>
> Well, SQL:2003 Foundation, p.550 clause 3a) states that the the
> <reference columns> in the referencing table must match a unique
> constraint on the referenced table, or the PRIMARY KEY if the columns
> are not specified. Either way, the referenced columns are a unique
> constraint (which makes perfect sense from a logical data perspective).
>
> We implement unique constraints via an index, so for PostgreSQL the
> clause implies that it must refer to an index.

IMHO, that reference is irrrelevant.  Yes, there must be an index due to
our implementation, however that doesn't imply that the types must be the
same, nor even that the index must be usable for the cross table
comparison.


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Delete query takes exorbitant amount of time
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Delete query takes exorbitant amount of time