Re: To prefer sorts or filters in postgres, that is the question....

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: To prefer sorts or filters in postgres, that is the question....
Дата
Msg-id 1523953145.2361.2.camel@cybertec.at
обсуждение исходный текст
Ответ на Re: To prefer sorts or filters in postgres, that is the question....  (Bob Jones <r.a.n.d.o.m.d.e.v.4+postgres@gmail.com>)
Список pgsql-general
Bob Jones wrote:
> My current thinking is that the filter is a bit like an "fgrep" and
> the sort actually requires memory allocation and some "real work", and
> thus I've settled on the filter for now pending experiments with a
> larger quantity of data.

That's fine.

A top-1-sort is less work than you maybe think:
You go through all items and find the biggest one.
So there is one comparison operator per row - very similar to
what happens when "grepping" for NULL values.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com


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

Предыдущее
От: Ron
Дата:
Сообщение: Re: pg_dump to a remote server
Следующее
От: Gao Jack
Дата:
Сообщение: RE: pg_dump to a remote server