From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Stephen Ramsey <sramsey(at)internap(dot)com> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: possible patch to increase number of hash overflow pages? |
Date: | 2001-06-19 14:51:41 |
Message-ID: | 22796.992962301@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Stephen Ramsey <sramsey(at)internap(dot)com> writes:
> I was attempting to index an int4 column on a table with 6x10^7 rows using
> the "hash" index algorithm under PostgreSQL 7.1 on Debian Linux, and
> received the following error message:
> nubs=# create index throughput_index_service_fk on throughput_datum using
> hash (service_fk);
> ERROR: HASH: Out of overflow pages. Out of luck.
Just out of curiosity, what's the reason for using a hash index at all?
The btree index type is much better supported and will do everything
that a hash index could do (and more).
> Looking into the source code a bit, it looked (to my untrained eye) as if
> it might be possible to increase the number of overflow pages, with a
> patch to src/include/access/hash.h to use a 32-bit "overflow page address"
> data type rather than a 16-bit "overflow page address" data type.
I haven't looked much at hash either, but am I right to guess that
overflow pages are used when an individual hash bucket fills up?
If so, overrunning a 16-bit field would suggest that you've got more
than 64K index pages in a single hash bucket ... which does not bode
well at all for performance. Seems like the answer is to get the thing
to use more hash buckets, not to make it possible to support linear
searches over chains exceeding 64K pages...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David D. Kilzer | 2001-06-19 15:03:55 | Re: [PATCH] Contrib C source for casting MONEY to INT[248] and FLOAT[48] |
Previous Message | Tom Lane | 2001-06-19 14:20:18 | Re: [PATCHES] [PATCH] Contrib C source for casting MONEY to INT[248] and FLOAT[48] |