Thanks for your insight Jeff. Interesting read!
K
Sent with [ProtonMail](https://protonmail.com) Secure Email.
‐‐‐ Original Message ‐‐‐
On Saturday, August 29, 2020 6:23 PM, Jeff Janes wrote:
> On Fri, Aug 28, 2020 at 8:34 AM Klaudie Willis
> wrote:
>
>> No index on n, no. Index might
On Fri, Aug 28, 2020 at 8:34 AM Klaudie Willis <
klaudie.wil...@protonmail.com> wrote:
> No index on n, no. Index might solve it yes, but it seems to me such a
> trivial optimization even without. Obviously it is not.
>
> QUERY
> PLAN
> |
>
> --
No index on n, no. Index might solve it yes, but it seems to me such a trivial
optimization even without. Obviously it is not.
QUERY PLAN |
--|
Limit (cost=1911272.10..1911272.12 rows=2 width=7) |
-> HashAggregate
Hi,
If "n" is indexed, it should run quickly. Can you share the execution plan for
your query?
De: "Klaudie Willis"
Para: "pgsql-general"
Enviadas: Sexta-feira, 28 de agosto de 2020 8:29:58
Assunto: Performance of "distinct with limit"
Hi,
Ran into this under-optimized query executi