Re: To prefer sorts or filters in postgres, that is the question.... - Mailing list pgsql-general

From Bob Jones
Subject Re: To prefer sorts or filters in postgres, that is the question....
Date
Msg-id CA+HuS5HOBqysd25njHFrs2oP-cag9VEwetDGqX1T95-da1Pw5A@mail.gmail.com
Whole thread Raw
In response to Re: To prefer sorts or filters in postgres, that is the question....  (Laurenz Albe <laurenz.albe@cybertec.at>)
Responses Re: To prefer sorts or filters in postgres, that is the question....
List pgsql-general
>
> At a short glance, I'd say that they are pretty much the same.
> The filter and the top-1-sort will both require a single scan through
> the result set and one operation per row found.
> And the recursive queries are pretty similar, right?
>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www.cybertec-postgresql.com


Thanks Laurenz.

After sending my original message, I did briefly reconsider things.

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.


pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Postgresql with JDK
Next
From: Gao Jack
Date:
Subject: RE: Re:Postgresql with JDK