Re: Hash index todo list item - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Hash index todo list item
Date
Msg-id 1189074288.7470.5.camel@hannu-laptop
Whole thread Raw
In response to Re: Hash index todo list item  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Hash index todo list item
List pgsql-hackers
Ühel kenal päeval, E, 2007-09-03 kell 19:55, kirjutas Tom Lane:
> Gregory Stark <stark@enterprisedb.com> writes:
> > "Kenneth Marshall" <ktm@rice.edu> writes:
> >> - What about multi-column indexes? The current implementation
> >> only supports 1 column.
> 
> > That seems kind of weird. It seems obvious that you mix the three hashes
> > together which reduces it to the solved problem. 
> 
> No, because part of the deal is that you can do lookups using only the
> leading index columns.  At least, all the existing multicolumn index
> types can do that.

One approahc is not to mix hashes, but to partition the hash, so that
each column gets its N bits in the hash. 

If you do it smartly you can use any column for index lookups, not just
the leading one.

>             regards, tom lane
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match



pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)
Next
From: Simon Riggs
Date:
Subject: Re: [FEATURE REQUEST] Streaming Onlinebackup (Maybe OFFTOPIC)