Index creation takes for ever - Mailing list pgsql-hackers

From ohp@pyrenet.fr
Subject Index creation takes for ever
Date
Msg-id Pine.UW2.4.53.0308281436230.10018@server.pyrenet.fr
Whole thread Raw
Responses Re: Index creation takes for ever
List pgsql-hackers
Hi every one,

I've tried to reindex one of my customer's table to gain some disk space.

I had to stop after 90 m cpu...

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.

Disks don't do anything, just cpu.

Here are the info I have
test=# \d ligneevt                               Table "public.ligne_evt"    Column      |           Type           |
               Modifiers
 

-----------------+--------------------------+-----------------------------------
-------------levt_cod        | integer                  | not null default nextval('seq_levt
_cod'::text)levt_tevt_cod   | integer                  | not nulllevt_date       | timestamp with time zone | not
nulllevt_type_per1 | integer                  | not nulllevt_perso_cod1 | integer                  | not
nulllevt_type_per2 | integer                  |levt_perso_cod2 | integer                  |levt_texte      | text
             |levt_lu         | character varying(2)     | default 'N'levt_visible    | character varying(2)
|levt_attaquant | integer                  |levt_cible      | integer                  |
 
Indexes: ligne_evt_pkey primary key btree (levt_cod),        levt_attaquant_ligne_evt_key btree (levt_attaquant),
levt_cible_ligne_evt_key btree (levt_cible),        levt_lu_ligne_evt_key btree (levt_lu),
levt_visible_ligne_evt_keybtree (levt_visible),        ligne_evt_levt_cod_key btree (levt_cod),
ligne_evt_levt_date_keybtree (levt_date),        ligne_evt_levt_perso_cod1_key btree (levt_perso_cod1),
ligne_evt_levt_perso_cod2_keybtree (levt_perso_cod2),        ligne_evt_levt_tevt_cod_key btree (levt_tevt_cod),
ligne_evt_levt_type_per1_keybtree (levt_type_per1),        ligne_evt_levt_type_per2_key btree (levt_type_per2)
 
Triggers: RI_ConstraintTrigger_5453038

test=# SELECT count(*) from ligne_evt ;count
--------230670
(1 row)

test=# SELECT levt_lu,count(*) from ligne_evt group by levt_lu;levt_lu | count
---------+--------N       |  49435O       | 181242
(2 rows)

Can some one help me?

Regards
-- 
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: ohp@pyrenet.fr
------------------------------------------------------------------------------
Make your life a dream, make your dream a reality. (St Exupery)


pgsql-hackers by date:

Previous
From: Andreas Pflug
Date:
Subject: Re: suspicous looking code in copy.c
Next
From: Oleg Bartunov
Date:
Subject: new version of tsearch2