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/