Deleting indexes during runtime
Posted in 1991
First of all I'm running C-ISAM 3.10 on a DEC 5810. Database access is almost exclusively through C-ISAM. I have a few programs that add records to a table constantly. This table has 10 indexes/keys (I'm not sure if those two words are interchangable). Most of the keys for the table are only used for searching for specific information and these keys are rarely used (at least compared to the more important keys). Once a day, I purge records from that table that are more than two days old. Because of the large number of records in the table and the large number of keys for the table, it can take nearly a second per record for deletion. This is way too slow for the 10,000 or more records that I purge. I beleive the reason for the slow speed of deletion is that for each record purged, all 10 keys must be recalculated. There are two ideas I have for improving speed: 1) Remove the rarely used keys for the table, do the purge which should now take substantially less time, and then recreate the keys. My question is that in a running system where the table is being modified all the time, can I get away with dropping a key and then recreating it? 2) Is there some way to mark which records I want to delete (without actually deleting them) and then delete the marked records? Thanks -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Doug RUDOFF Motorola Mobile Data Bothell, WA uunet!mdisea!rudoff (206) 487-5937 rudoff@mdi.com -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=