Re: index on id and created_at

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: index on id and created_at
Дата
Msg-id dcc563d10809111158u5185ba1bo4d84d086b99bc389@mail.gmail.com
обсуждение исходный текст
Ответ на index on id and created_at  (Marcus Engene <mengpg2@engene.se>)
Список pgsql-general
On Thu, Sep 11, 2008 at 10:08 AM, Marcus Engene <mengpg2@engene.se> wrote:
> select
>   objectid
> from
>   apa
> where
>   created_at > now() - interval '1 day'
> order by
>   objectid desc;
>
> In this select, it would have been nice to dodge the full table scan without
> adding an index to created_at. Is this possible somehow?

Not really.  It's a choice of one or the other.

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: "Healing" a table after massive updates
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: connection timeouts and "killing" users