Re: where+orderby+limit not (always) using appropriate index? - Mailing list pgsql-performance

From PFC
Subject Re: where+orderby+limit not (always) using appropriate index?
Date
Msg-id op.sqy79pi8th1vuj@localhost
Whole thread Raw
In response to where+orderby+limit not (always) using appropriate index?  (Szűcs Gábor <surrano@gmail.com>)
List pgsql-performance

> SELECT o FROM t WHERE i = 1 ORDER BY o LIMIT 1;

    use :
    ORDER BY i, o

    If you have a multicol index and want to order on it, you should help the
planner by ORDERing BY all of the columns in the index...
    It bit me a few times ;)

pgsql-performance by date:

Previous
From: Szűcs Gábor
Date:
Subject: where+orderby+limit not (always) using appropriate index?
Next
From: Tom Lane
Date:
Subject: Re: where+orderby+limit not (always) using appropriate index?