Re: Multicolumn hash indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Tomasz Ostrowski <tometzky+pg(at)ato(dot)waw(dot)pl>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Jesper Pedersen <jesper(dot)pedersen(at)redhat(dot)com>
Subject: Re: Multicolumn hash indexes
Date: 2017-09-29 14:54:55
Message-ID: 19865.1506696895@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Maybe you're worrying about something like a billion-row table where
> there are 3 columns that form a composite key: (1,1,1), (1,1,2), ...,
> (1,1000),(1,2,1),...,(1,1000,1000),(2,1,1),...,(1000,1000,1000). In
> that case, treating the leading column as most important will indeed
> be terrible, since we'll put all billion rows into 1000 buckets no
> matter how many bucket splits we do.

> That seems a little unusual, though.

There are few if any indexing techniques where the first column isn't
significantly more important than the rest --- certainly that's true
for btree, for example. I do not think it's a showstopper if that's
true for hash as well.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2017-09-29 15:10:09 Re: bgw_type (was Re: Why does logical replication launcher set application_name?)
Previous Message Alexander Korotkov 2017-09-29 14:50:48 Re: GSoC 2017: weekly progress reports (week 4) and patch for hash index