From: | Andrei Zhidenkov <andrei(dot)zhidenkov(at)n26(dot)com> |
---|---|
To: | Игорь Выскорко <vyskorko(dot)igor(at)yandex(dot)ru> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Weird seqscan node plan |
Date: | 2019-11-26 09:02:44 |
Message-ID: | DA490E2B-49FB-4AE4-9134-28CC3157F2B2@n26.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
How many tables do you have in your query? If too many, in your case “Genetic Query Optiomiation” might be used (https://www.postgresql.org/docs/10/geqo-pg-intro.html <https://www.postgresql.org/docs/10/geqo-pg-intro.html>).
> On 26. Nov 2019, at 03:19, Игорь Выскорко <vyskorko(dot)igor(at)yandex(dot)ru> wrote:
>
> Hi all!
> I'm confused by planner choice: seqscan but not index scan when index scan cost is much cheaper.
> 1st plan: https://explain.depesz.com/s/Cti#l8
> 2nd plan (with "set enable_seqscan = off"): https://explain.depesz.com/s/qn0I#l8
>
> Look at 8th row: this nested loop decided to join the second node by using seqscan (1st plan) when index is available (2nd plan). Index scan is much cheaper (0.430 over 257.760).
>
> What am I missing?
>
> And thanks for any reply!
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Игорь Выскорко | 2019-11-26 09:12:50 | Re: Weird seqscan node plan |
Previous Message | Игорь Выскорко | 2019-11-26 02:19:39 | Weird seqscan node plan |