I did not expect so many answers about this question. Thanks. I find by myself the "order by trick" to speed min/max function. Jean-Gérard Pailloncy
pgsql-performance by date:
Соглашаюсь с условиями обработки персональных данных