Re: Bitmap scan seem like such a strange choice when "limit 1" - Mailing list pgsql-general

From Tom Lane
Subject Re: Bitmap scan seem like such a strange choice when "limit 1"
Date
Msg-id 874451.1599230481@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bitmap scan seem like such a strange choice when "limit 1"  (Klaudie Willis <Klaudie.Willis@protonmail.com>)
Responses Re: Bitmap scan seem like such a strange choice when "limit 1"  (Michael Lewis <mlewis@entrata.com>)
List pgsql-general
Klaudie Willis <Klaudie.Willis@protonmail.com> writes:
> I'd like to add, that when I do the same query DIRECTLY on the bigtable_y2020 (instead of the partition parent) it
doeschange to "index scan" again. 

Yeah.  I think the issue here is that add_paths_to_append_rel only
considers cheapest-total paths for the member relations.  Seeing
that it's already considering a slightly ridiculous number of
parallelization options, I'm hesitant to throw in cheapest-startup
considerations as well, for fear of blowing out planning time.

Maybe the right way to improve this is to bypass add_paths_to_append_rel
entirely when there's exactly one surviving child rel, and make it
just use all the surviving paths for that child.

            regards, tom lane



pgsql-general by date:

Previous
From: Rich Shepard
Date:
Subject: Re: Check for duplicates before inserting new rows
Next
From: Rich Shepard
Date:
Subject: Re: Check for duplicates before inserting new rows