Hi Tom, This is on unixware 7 (both 7.3.4 and 7.4b) I'm on the FR language (I'll re-initdb whith lang=C to see what happens) But I never had a problem before. Waiting for a reply, I drop the table after copying it, and arranged sql script to create the indexes BEFORE the COPY
The overall process took only 5 Min. On Thu, 28 Aug 2003, Tom Lane wrote: > Date: Thu, 28 Aug 2003 10:13:21 -0400 > From: Tom Lane <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Cc: pgsql-hackers list <[EMAIL PROTECTED]> > Subject: Re: [HACKERS] Index creation takes for ever > > [EMAIL PROTECTED] 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 | 49435 > O | 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 > -- Olivier PRENANT Tel: +33-5-61-50-97-00 (Work) 6, Chemin d'Harraud Turrou +33-5-61-50-97-01 (Fax) 31190 AUTERIVE +33-6-07-63-80-64 (GSM) FRANCE Email: [EMAIL PROTECTED] ------------------------------------------------------------------------------ Make your life a dream, make your dream a reality. (St Exupery) ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly