Re: Create Index (Hash) on a Large Table Taking Days...
От | Harald Armin Massa |
---|---|
Тема | Re: Create Index (Hash) on a Large Table Taking Days... |
Дата | |
Msg-id | 7be3f35d0801080656h61b06f4ft6837f5099e11e623@mail.gmail.com обсуждение исходный текст |
Ответ на | Create Index (Hash) on a Large Table Taking Days... (ProfKheel <ilya.j.s@googlemail.com>) |
Список | 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!
В списке pgsql-general по дате отправления: