public inbox for [email protected]  
help / color / mirror / Atom feed
From: [email protected]
To: jian he <[email protected]>
Cc: [email protected]
Subject: Re: UniqueKey v2
Date: Tue, 07 Nov 2023 11:44:42 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACJufxEaiucCmi78DWYvQx7TxDac+ZGx5d2E-Dx988HYT3KEuw@mail.gmail.com>
References: <[email protected]>
	<CACJufxHNn27N5uRSU64TBFqFAMf0HEVzNGz6yB-JMFQZnT0T0g@mail.gmail.com>
	<[email protected]>
	<CACJufxHuU7fj2Y1hWGdRHxyzw+L8YeJ3nXnDaaVJgX5F7a8OTw@mail.gmail.com>
	<[email protected]>
	<CACJufxEaiucCmi78DWYvQx7TxDac+ZGx5d2E-Dx988HYT3KEuw@mail.gmail.com>


jian he <[email protected]> writes:

> On Fri, Oct 20, 2023 at 4:33 PM <[email protected]> wrote:
>>
>>
>> > i did some simple tests using text data type.
>> >
>> > it works with the primary key, not with unique indexes.
>> > it does not work when the column is unique, not null.
>> >
>> > The following is my test.
>>
>> Can you simplify your test case please? I can't undertand what "doesn't
>> work" mean here and for which case. FWIW, this feature has nothing with
>> the real data, I don't think inserting any data is helpful unless I
>> missed anything.
>
> Sorry for not explaining it very well.
> "make distinct as no-op."
> my understanding: it means: if fewer rows meet the criteria "columnX <
>  const_a;" , after analyze the table, it should use index only scan

No, "mark distinct as no-op" means the distinct node can be discarded
automatically since it is not needed any more. The simplest case would
be "select distinct pk from t", where it should be same as "select pk
from t".  You can check the testcase for the more cases. 

-- 
Best Regards
Andy Fan







view thread (4+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: UniqueKey v2
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox