Re: Slow plan for MAX/MIN or LIMIT 1?

Поиск
Список
Период
Сортировка
От Claudio Freire
Тема Re: Slow plan for MAX/MIN or LIMIT 1?
Дата
Msg-id CAGTBQpYaBU4iYqfTN_Bx5JP026FC3n7kpfAg+Lu3kcAS9mJ=hQ@mail.gmail.com
обсуждение исходный текст
Ответ на Slow plan for MAX/MIN or LIMIT 1?  ("Sam Wong" <sam@hellosam.net>)
Ответы Re: Slow plan for MAX/MIN or LIMIT 1?  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-performance
On Tue, Sep 24, 2013 at 6:24 AM, Sam Wong <sam@hellosam.net> wrote:
> This event_log table has 4 million rows.
>
> “log_id” is the primary key (bigint),
>
> there is a composite index “event_data_search” over (event::text,
> insert_time::datetime).


I think you need to add log_id to that composite index to get pg to use it.


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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Slow plan for MAX/MIN or LIMIT 1?
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Planner performance extremely affected by an hanging transaction (20-30 times)?