Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Re: Multi field hash indexes

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: ocie(at)paracel(dot)com
Cc: hannu(at)trust(dot)ee, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: Multi field hash indexes
Date: 1998-03-17 19:05:07
Message-ID: 199803171905.OAA16761@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
> I was originally thinking that this would be supported like the btree
> indexes are now -- an index on (a,b,c,d) serves as in index on a,
> (a,b), (a,b,c) and (a,b,c,d), but it doesn't serve as an index on b,
> or (b,c), etc.  My original idea was that the first item in the index
> would define a hash table whose entries were hash tables on the second
> item, etc.  I now think that this would waste quite a bit of space,
> and would have the same restriction as btrees, which is unnatural.

This is a standard restriction.  If you need an index on a lower-level
field, create one.  I don't think you are going to be able to improve on
(a,b), (a,b,c).  If you allowed (b,c) that is another index.


-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-03-17 19:07:53
Subject: Re: [HACKERS] Some cleanups/enhancements
Previous:From: Bruce MomjianDate: 1998-03-17 18:59:37
Subject: Re: [HACKERS] First mega-patch...h

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group