Weird seqscan node plan

From: Игорь Выскорко <vyskorko(dot)igor(at)yandex(dot)ru>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Weird seqscan node plan
Date: 2019-11-26 02:19:39
Message-ID: 154007751574734779@myt2-a7d7570d35ff.qloud-c.yandex.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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!

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrei Zhidenkov 2019-11-26 09:02:44 Re: Weird seqscan node plan
Previous Message Yessica Brinkmann 2019-11-25 21:38:37 Re: I think that my data is saved correctly, but when printing again, other data appears