Re: Index creation takes for ever
От | Tom Lane |
---|---|
Тема | Re: Index creation takes for ever |
Дата | |
Msg-id | 13925.1062080001@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Index creation takes for ever (ohp@pyrenet.fr) |
Ответы |
Re: Index creation takes for ever
Re: Index creation takes for ever |
Список | pgsql-hackers |
ohp@pyrenet.fr writes: > I've then pg_dump'ed the database and recreate an other both on 7.3.4 and > 7.4b > Both are still running after more than 30 minutes of CPU (100% cpu taken) > creating the levt_lu_ligne_evt_key. That's hard to believe. I get regression=# SELECT levt_lu,count(*) from ligne_evt group by levt_lu;levt_lu | count ---------+--------N | 49435O | 181242 (2 rows) Time: 6927.28 ms regression=# create index levt_lu_ligne_evt_key on ligne_evt (levt_lu); CREATE INDEX Time: 14946.74 ms on a not-very-fast machine ... and it seems to be mostly I/O bound. What platform are you on? I could believe that the local qsort() is incredibly inefficient with many equal keys. Another possibility is that you're using a non-C locale and strcoll() is horribly slow. regards, tom lane
В списке pgsql-hackers по дате отправления: