On 10 April 2012 16:40, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
> On 10.04.2012 18:31, Jeff Janes wrote:
>> If I do "select count(distinct bid) from pgbench_accounts" I get many
>> calls to btint4fastcmp, but if I do "create index on pgbench_accounts
>> (bid)" I instead get many calls to btint4cmp. If the index build is
>> using SortSupport, shouldn't it also be calling btint4fastcmp like the
>> distinct does?
>
>
> Oh, sorry, you're right. I stand corrected.
There is an impedance mismatch between tuplesort_begin_heap and
tuplesort_begin_index_btree that prevented this from being done with
the initial commit. Strangely, the SortSupport commit message didn't
comment on this.
--
Peter Geoghegan http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services