Re: Indexing question

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Indexing question
Дата
Msg-id 0be001c36e05$83034fb0$2800a8c0@mars
обсуждение исходный текст
Ответ на Indexing question  ("Alexander Priem" <ap@cict.nl>)
Список pgsql-performance
> So if I understand correctly I could ditch the 'deleted' field entirely
and
> use just the 'deleteddate' field. This 'deleteddate' field would be NULL
by
> default. It would contain a date value if the record is considered
> 'deleted'.
>
> The index would be 'create index a on tablename(deleteddate) where
> deleteddate is null'.
>
> I could then access 'current' records with a view like 'create view x_view
> as select * from tablename where deleteddate is null'.
>
> Is that correct? This would be the best performing solution for this kind
of
> thing, I think (theoretically at least)?

Yes, I think it would be best.  Definitely better than your current
solution.

Cheers,

Chris


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

Предыдущее
От: Ken Geis
Дата:
Сообщение: Re: bad estimates
Следующее
От: "Christopher Kings-Lynne"
Дата:
Сообщение: Re: bad estimates