Thread View: borland.public.cppbuilder.database.multi-tier
2 messages
2 total messages
Started by Furno Gianluca
Thu, 23 Mar 2000 00:00
DBF & MDX Index Rebuild Problems
Author: Furno Gianluca
Date: Thu, 23 Mar 2000 00:00
Date: Thu, 23 Mar 2000 00:00
32 lines
1533 bytes
1533 bytes
Hi boys, I'm using DBF DBase IV compatible tables with .MDX type indexes in my application I have a problem using the DbiRegenIndexes function. The sequence that unslash the problem is the following : - I insert a lot of records ( The indexes are well updated ) - I delete some records from the table ( I can see the '*' mark at the start of the record wich means that the record was correclty deleted in the DBF file) - I launch the DbiRegenIndexes function ( to simulate a lost of sync between Table <-> Index ) ----- Now i observe that inside the rebuilded index still contains the deleted KEYS ( Why?) ---- Now, at this point , If i try to insert the same KEY of a deleted KEY, the system throw an exception ( DUPLICATE UNIQUE KEY EXCEPTION OR SIMILAR ) Do i perform some wrong operations ? What is the right operation sequence to Delete and Re-Insert records with the same INDEXED KEY and how i can perform a safe index rebuiding ? Please help me .... Thanks, Furno Gianluca info@microshadow.com
Re: DBF & MDX Index Rebuild Problems
Author: Dirk Schwammkrug
Date: Fri, 24 Mar 2000 00:00
Date: Fri, 24 Mar 2000 00:00
55 lines
2319 bytes
2319 bytes
Hi Furno, AFAIK, you have two alternative solutions: 1) you can pack the databases each time before rebuilding the index files. That way, the '*'-marked records will be deleted and cause no further trouble. 2) attach a filter expression to the index expressions to filter deleted records, e.g. "DELETED()". This way the index won't care for deleted records, which would also speed up searches a bit. hope this helps, Dirk Furno Gianluca wrote: > > Hi boys, > > I'm using DBF DBase IV compatible tables with .MDX type indexes in my > application > > I have a problem using the DbiRegenIndexes function. > > The sequence that unslash the problem is the following : > > - I insert a lot of records ( The indexes are well updated ) > - I delete some records from the table ( I can see the '*' mark at the start > of the record wich means that the record was correclty deleted in the DBF > file) > - I launch the DbiRegenIndexes function ( to simulate a lost of sync between > Table <-> Index ) > > ----- Now i observe that inside the rebuilded index still contains the > deleted KEYS ( Why?) ---- > > Now, at this point , If i try to insert the same KEY of a deleted KEY, the > system throw an exception ( DUPLICATE UNIQUE KEY EXCEPTION OR SIMILAR ) > > Do i perform some wrong operations ? > What is the right operation sequence to Delete and Re-Insert records with > the same INDEXED KEY and how i can perform a safe index rebuiding ? > > Please help me .... > > Thanks, > Furno Gianluca > > info@microshadow.com -- _________________________________________________ Dirk Schwammkrug Computer Scientist R & D Chemspeed Ltd, CH-Augst, http:\\www.chemspeed.com Phone: (+41)61-8169-640 Fax: [..]-509
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads