Re: where+orderby+limit not (always) using appropriate index?

От: PFC
Тема: Re: where+orderby+limit not (always) using appropriate index?
Дата: ,
Msg-id: op.sqy79pi8th1vuj@localhost
(см: обсуждение, исходный текст)
Ответ на: where+orderby+limit not (always) using appropriate index?  (Szűcs Gábor)
Список: 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 по дате сообщения:

От: Vivek Khera
Дата:
Сообщение: Re: [pgsql-benchmarks] Error when try installing pgbench ?
От: Josh Berkus
Дата:
Сообщение: Re: Tuning planner cost estimates