Search Postgresql Archives

Re: Create Index (Hash) on a Large Table Taking Days...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>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!

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux