| From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
|---|---|
| To: | Erik Rijkers <er(at)xs4all(dot)nl>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
| Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, 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:15 |
| Message-ID: | 5653d632-3b0b-190b-2119-b15b25147663@sigaev.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alexander Korotkov | 2018-04-07 12:27:59 | Re: WIP: Covering + unique indexes. (the good and the bad) |
| Previous Message | Alvaro Herrera | 2018-04-07 12:25:44 | Re: Mop-up for the bootstrap data conversion patch |