Re: WIP: Covering + unique indexes. (the good and the bad)

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Erik Rijkers <er(at)xs4all(dot)nl>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Anastasia Lubennikova <a(dot)lubennikova(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Alexander Kuzmenkov <a(dot)kuzmenkov(at)postgrespro(dot)ru>
Subject: Re: WIP: Covering + unique indexes. (the good and the bad)
Date: 2018-04-07 12:27:59
Message-ID: CAPpHfduq40PjwoJvHMRnLbY48jFv1N1x492qWUySxp5ttBu4Zw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Apr 7, 2018 at 2:57 PM, Erik Rijkers <er(at)xs4all(dot)nl> wrote:

> On 2018-04-06 20:08, Alexander Korotkov wrote:
>
>>
>> [0001-Covering-v15.patch]
>>
>>
> After some more testing I notice there is also a down-side/slow-down to
> this patch that is not so bad but more than negligible, and I don't think
> it has been mentioned (but I may have missed something in this thread
> that's now been running for 1.5 year, not to mention the tangential
> btree-thread(s)).
>
> I attach my test-program, which compares master (this morning) with
> covered_indexes (warning: it takes a while to generate the used tables).
>
> The test tables are created as:
> create table $t (c1 int, c2 int, c3 int, c4 int);
> insert into $t (select x, 2*x, 3*x, 4 from generate_series(1, $rowcount)
> as x);
> create unique index ${t}uniqueinclude_idx on $t using btree (c1, c2)
> include (c3, c4);
>
> or for HEAD, just:
> create unique index ${t}unique_idx on $t using btree (c1, c2);
>

Do I understand correctly that you compare unique index on (c1, c2) with
master to unqiue index on (c1, c2) include (c3, c4) with patched version?
If so then I think it's wrong to say about down-side/slow-down of this
patch based on this comparison.
Patch *does not* cause slowdown in this case. Patch provides user a *new
option* which has its advantages and disadvantages. And what you compare
is advantages and disadvantages of this option, not slow-down of the patch.
In the case you compare *the same* index on master and patched version,
then it's possible to say about slow-down of the patch.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-04-07 12:31:48 Re: Mop-up for the bootstrap data conversion patch
Previous Message Teodor Sigaev 2018-04-07 12:27:15 Re: WIP: Covering + unique indexes. (the good and the bad)