Re: SELECT LIMIT 1 VIEW Performance Issue

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: SELECT LIMIT 1 VIEW Performance Issue
Дата
Msg-id 6EE64EF3AB31D5448D0007DD34EEB3417DD58A@Herge.rcsinc.local
обсуждение исходный текст
Ответ на SELECT LIMIT 1 VIEW Performance Issue  (K C Lau <kclau60@netvigator.com>)
Ответы Re: SELECT LIMIT 1 VIEW Performance Issue  (K C Lau <kclau60@netvigator.com>)
Список pgsql-performance
KC wrote:
>
> So I guess it all comes back to the basic question:
>
> For the query select distinct on (PlayerID) * from Player a where
> PlayerID='22220' order by PlayerId Desc, AtDate Desc;
> can the optimizer recognise the fact the query is selecting by the
primary
> key (PlayerID,AtDate), so it can skip the remaining rows for that
> PlayerID,
> as if LIMIT 1 is implied?
>
> Best regards, KC.

Hi KC, have you tried:
select * from player where playerid = '22220' and atdate < 9999999999
order by platerid desc, atdate desc limit 1;

??
Merlin

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

Предыдущее
От: Enrico Weigelt
Дата:
Сообщение: Re: Massive delete performance
Следующее
От: K C Lau
Дата:
Сообщение: Re: SELECT LIMIT 1 VIEW Performance Issue