Re: Index Skip Scan - Mailing list pgsql-hackers

From Andy Fan
Subject Re: Index Skip Scan
Date
Msg-id CAKU4AWomHRZJ44DeX8KqqaBPMsvEP4EAJYqXxMZ=n-dxHCxk4Q@mail.gmail.com
Whole thread Raw
In response to Re: Index Skip Scan  (Dmitry Dolgov <9erthalion6@gmail.com>)
List pgsql-hackers


On Wed, Mar 25, 2020 at 12:41 AM Dmitry Dolgov <9erthalion6@gmail.com> wrote:
> On Wed, Mar 11, 2020 at 06:56:09PM +0800, Andy Fan wrote:
>
> There was a dedicated thread  [1]  where David explain his idea very
> detailed, and you can also check that messages around that message for
> the context. hope it helps.

Thanks for pointing out to this thread! Somehow I've missed it, and now
looks like we need to make some efforts to align patches for index skip
scan and distincClause elimination.

Yes:).   Looks Index skip scan is a way of make a distinct result without a real
distinct node,  which happens after the UniqueKeys check where I try to see if
the result is unique already and before the place where create a unique node
for distinct node(With index skip scan we don't need it all).  Currently in my patch,
the logical here is 1).  Check the UniqueKey to see if the result is not unique already.
if not, go to next 2).  After the distinct paths are created,  I will add the result of distinct
path as a unique key.   Will you add the index skip scan path during create_distincts_paths
and add the UniqueKey to RelOptInfo?  if so I guess my current patch can handle it since
it cares about the result of distinct path but no worried about how we archive that. 


Best Regards
Andy Fan

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: PATCH: add support for IN and @> in functional-dependencystatistics use
Next
From: Andres Freund
Date:
Subject: Re: Include sequence relation support in logical replication