Re: WIP: Covering + unique indexes. (the good and the bad) - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: WIP: Covering + unique indexes. (the good and the bad)
Date
Msg-id 5653d632-3b0b-190b-2119-b15b25147663@sigaev.ru
Whole thread Raw
In response to Re: WIP: Covering + unique indexes. (the good and the bad)  (Erik Rijkers <er@xs4all.nl>)
List pgsql-hackers
Thank you!

>    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);



> -- explain analyze select c1, c2 from nt0___100000000 where c1 < 10000 
> -- explain analyze select c1, c2 from nt0___100000000 where c1 < 10000 
> and c3 < 20

Not so fair comparison, include index twice bigger because of include 
columns. Try to compare with covering-emulated index:
create unique index ${t}unique_idx on $t using btree (c1, c2, c3, c4)

-- 
Teodor Sigaev                      E-mail: teodor@sigaev.ru
                                       WWW: http://www.sigaev.ru/


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Mop-up for the bootstrap data conversion patch
Next
From: Alexander Korotkov
Date:
Subject: Re: WIP: Covering + unique indexes. (the good and the bad)