Re: Planner doesn't look at LIMIT?

Поиск
Список
Период
Сортировка
От PFC
Тема Re: Planner doesn't look at LIMIT?
Дата
Msg-id op.subgiji7th1vuj@localhost
обсуждение исходный текст
Ответ на Planner doesn't look at LIMIT?  (Dawid Kuroczko <qnex42@gmail.com>)
Список pgsql-performance
    Which row do you want ? Do you want 'a row' at random ?
    I presume you want the N latest rows ?
    In that case you should use an ORDER BY on an indexed field, the serial
primary key will do nicely (ORDER BY id DESC) ; it's indexed so it will
use the index and it will fly.

> Any ideas how to make it work (other than rewriting the query to use
> subselects, use explicit id-rows, disabling hashjoin completely)?
> Or is this a bug?
>
>    Regards,
>       Dawid
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>



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

Предыдущее
От: Dawid Kuroczko
Дата:
Сообщение: Planner doesn't look at LIMIT?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Planner doesn't look at LIMIT?