Re: Selecting table row with latest date

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Selecting table row with latest date
Дата
Msg-id alpine.LNX.2.20.2108190746270.15165@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Selecting table row with latest date  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, 19 Aug 2021, Tom Lane wrote:

> The best way is usually like
>
>    select * from mytable order by contact_date desc limit 1;
>
> If you have an index on contact_date this should work very well indeed.

Tom,

I don't have an index on that table. I'll add one and try you suggestion.

Thanks,

Rich



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

Предыдущее
От: Rich Shepard
Дата:
Сообщение: Re: Selecting table row with latest date
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Selecting table row with latest date