Re: Weird seqscan node plan - Mailing list pgsql-general

From Andrei Zhidenkov
Subject Re: Weird seqscan node plan
Date
Msg-id AB4858A2-025C-4995-B275-66B1E66AEEDE@n26.com
Whole thread Raw
In response to Re: Weird seqscan node plan  (Игорь Выскорко <vyskorko.igor@yandex.ru>)
Responses Re: Weird seqscan node plan
List pgsql-general
At this point I disagree. It’s faster to fetch one row using seq scan that using index scan as well as fetching number of consecutive rows is faster via seq scan. Index scan is not always faster.

On 27. Nov 2019, at 04:53, Игорь Выскорко <vyskorko.igor@yandex.ru> wrote:

Why planner mistakes in determining the number of rows (every time planner expects only 1 row) in this step I can understand - inner nodes do some joins (inner and outer with filtration) and it's hard to predict result.
But what I can't understand is why seq scan when it is always slower than index.

pgsql-general by date:

Previous
From: Игорь Выскорко
Date:
Subject: Re: Weird seqscan node plan
Next
From: Lauri Kajan
Date:
Subject: Range contains element filter not using index of the element column