Re: Can inherited tables help in this case?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Can inherited tables help in this case?
Дата
Msg-id 200306190935.22121.dev@archonet.com
обсуждение исходный текст
Ответ на Can inherited tables help in this case?  (Avi Schwartz <avi@CFFtechnologies.com>)
Список pgsql-general
On Thursday 19 Jun 2003 6:37 am, Avi Schwartz wrote:
> Hi,
>
> We have a table, lets say of products.  Some products get deleted from
> time to time, using a soft delete (i.e. they have a date deleted
> attribute which is set when the the record is deleted.  We never
> physically delete the records.  Is there a way that table inheritance
> can be used to help us speed up queries?

You might find a partial index to be of use. Something like:

CREATE INDEX my_index ON products (prod_id) WHERE delete_date IS NULL;

--
  Richard Huxton

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

Предыдущее
От: culley harrelson
Дата:
Сообщение: explicit joins vs implicit joins
Следующее
От: Antonios Christofides
Дата:
Сообщение: Incremental backups, and backup history