From: | "Harald Armin Massa" <haraldarminmassa(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Create Index (Hash) on a Large Table Taking Days... |
Date: | 2008-01-08 14:56:11 |
Message-ID: | 7be3f35d0801080656h61b06f4ft6837f5099e11e623@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>I have a very large table (~5GB, 100mm rows) on which I am creating an
>index on an int4 column:
>CREATE INDEX CONCURRENTLY rums_idx2
> ON rums
> USING hash
> (user_id);
Why are you using a hash index on an int4 column?
as you have 100mm (mm= Million?) rows, only 1 GIG ram and the
column_name is "user_id", I suspect:
- you have far less then 100*10E6 Users
- there are less distince user_ids than rows
I just know "hash" from general programming, thatfor my belly is
announcing "hash collisions, hash collisions" ...
(within PostgreSQL I once read that hash indices are only for some
cases I could not match to something that happens in my world; since
then I am using default btree and am VERY happy.)
Best wishes,
Harald
--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Spielberger Straße 49
70435 Stuttgart
0173/9409607
fx 01212-5-13695179
-
EuroPython 2008 will take place in Vilnius, Lithuania - Stay tuned!
From | Date | Subject | |
---|---|---|---|
Next Message | Harald Armin Massa | 2008-01-08 15:01:45 | large objects,was: Restoring 8.0 db to 8.1 |
Previous Message | Tatsuo Ishii | 2008-01-08 14:55:10 | Re: Cannot connect to PgPool |