RE: index Unusable

  • From: "Mercadante, Thomas F" <thomas.mercadante@xxxxxxxxxxxxxxxxx>
  • To: "'thump@xxxxxxxxxxxxxxxx'" <thump@xxxxxxxxxxxxxxxx>, Oracle-L <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 1 Dec 2004 08:04:12 -0500

David,

Not sure why the index became unusable.  
But why didn't you just alter the cmc_crc column to a varchar2(500).  There
was really no need to add a temnp column and move the data back and forth. 

You could have altered the column with the data in it.

Tom

-----Original Message-----
From: David [mailto:thump@xxxxxxxxxxxxxxxx] 
Sent: Tuesday, November 30, 2004 5:24 PM
To: Oracle-L
Subject: index Unusable

What would cause the PK column index(on object_id) to become unusable
after the fllowing steps:  NO direct import or other such activites that
would def cause this....

alter table ship_objects add temp varchar2(500);

update ship_objects set temp = cmp_crc, cmp_crc = null;
commit;
alter table ship_objects modify (
        cmp_armor_hp_maximum varchar2(400),
        cmp_armor_hp_current varchar2(400),
        cmp_efficiency_general varchar2(400),
        cmp_efficiency_eng varchar2(400),
        cmp_eng_maintenance varchar2(400),
        cmp_mass varchar2(400),
        cmp_crc varchar2(500),
        cmp_hp_current varchar2(400),
        cmp_hp_maximum varchar2(400),
        cmp_flags varchar2(400),
        weapon_damage_maximum varchar2(400),
        weapon_damage_minimum varchar2(400),
        weapon_effectiveness_shields varchar2(400),
        weapon_effectiveness_armor varchar2(400),
        weapon_eng_per_shot varchar2(400),
        weapon_refire_rate varchar2(400),
        weapon_ammo_current varchar2(400),
        weapon_ammo_maximum varchar2(400),
        weapon_ammo_type varchar2(400),
        cmp_creators varchar2(400));
update ship_objects set cmp_crc = temp;
update version_number set version_number=185, min_version_number=185;
commit;
alter table ship_objects drop column temp;
-- 
..
David


--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l

Other related posts: