Weird seqscan node plan - Mailing list pgsql-general

From Игорь Выскорко
Subject Weird seqscan node plan
Date
Msg-id 154007751574734779@myt2-a7d7570d35ff.qloud-c.yandex.net
Whole thread Raw
Responses Re: Weird seqscan node plan
List 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
(2ndplan). Index scan is much cheaper (0.430 over 257.760). 
 

What am I missing?

And thanks for any reply!



pgsql-general by date:

Previous
From: Yessica Brinkmann
Date:
Subject: Re: I think that my data is saved correctly, but when printing again,other data appears
Next
From: Andrei Zhidenkov
Date:
Subject: Re: Weird seqscan node plan