Re: Index Skip Scan

From: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
To: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
Cc: James Coleman <jtc331(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Floris Van Nee <florisvannee(at)optiver(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Bhushan Uparkar <bhushan(dot)uparkar(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Subject: Re: Index Skip Scan
Date: 2020-03-25 00:39:29
Message-ID: CAKU4AWomHRZJ44DeX8KqqaBPMsvEP4EAJYqXxMZ=n-dxHCxk4Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 25, 2020 at 12:41 AM Dmitry Dolgov <9erthalion6(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-03-25 00:44:39 Re: Include sequence relation support in logical replication
Previous Message Tomas Vondra 2020-03-25 00:28:01 Re: PATCH: add support for IN and @> in functional-dependency statistics use