Re: Optimization of this SQL sentence

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: Optimization of this SQL sentence
Дата
Msg-id b42b73150610181237r332d2f30ld48ff2b7f1f4d29@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Optimization of this SQL sentence  ("Jim C. Nasby" <jim@nasby.net>)
Список pgsql-performance
On 10/18/06, Jim C. Nasby <jim@nasby.net> wrote:
> On Tue, Oct 17, 2006 at 12:51:19PM -0400, Merlin Moncure wrote:
> > so, imo alexander is correct:
> > contacto varchar(255)
> >
> > ...is a false constraint, why exactly 255? is that were the dart landed?
>
> BTW, if we get variable-length varlena headers at some point, then
> setting certain limits might make sense to keep performance more
> consistent.

I would argue that it is assumptions about the underlying architecture
that got everyone into trouble in the first place :).  I would prefer
to treat length constraint as a constraint (n + 1 = error), unless
there was a *compelling* reason to do otherwise, which currently there
isn't (or hasn't been since we got toast)  a  lot of this stuff s due
to legacy thinking, a lot of dbf products had limts to varchar around
255 or so.

imo, a proper constraint system would apply everything at the domain
level, and minlength and maxlength would get equal weight, and be
optional for all types.

merlin

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Optimization of this SQL sentence (SOLVED)
Следующее
От: Ioana Danes
Дата:
Сообщение: Postgresql 8.1.4 - performance issues for select on view using max