Re: Slow plan for MAX/MIN or LIMIT 1? - Mailing list pgsql-performance

From Claudio Freire
Subject Re: Slow plan for MAX/MIN or LIMIT 1?
Date
Msg-id CAGTBQpYaBU4iYqfTN_Bx5JP026FC3n7kpfAg+Lu3kcAS9mJ=hQ@mail.gmail.com
Whole thread Raw
In response to Slow plan for MAX/MIN or LIMIT 1?  ("Sam Wong" <sam@hellosam.net>)
Responses Re: Slow plan for MAX/MIN or LIMIT 1?
List 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 by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Slow plan for MAX/MIN or LIMIT 1?
Next
From: Jeff Janes
Date:
Subject: Re: Planner performance extremely affected by an hanging transaction (20-30 times)?