Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is Reindex safe?
Message
 
 
To
14/01/2019 14:14:34
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01665364
Message ID:
01665399
Views:
54
>>>>Hi,
>>>>
>>>>I have not used the REINDEX command in a very long time. And I am getting a lot of problems related to the application not being able to read some .cdx files. These CDX files are part of the SFQUERY and SDT and I don't know the structure of the indexes. So, just to be sure that the problem is not with a corrupted index, I thought I would reindex these DBFs.
>>>>I am thinking of simply executing the following command:
>>>>
>>>>
>>>>use SDTMETA
>>>>REINDEX
>>>>
>>>>
>>>>And the same with a couple of other meta DBFs. Is the above safe?
>>>
>>>It depends on the nature of the index corruption / error. I've observed some odd errors that can only be corrected by physically deleting the CDX and recreating it. In other cases, completely dropping the TAG and re-creating it.
>>>
>>>In general, REINDEX will always work properly, but if the index is corrupted it won't always correct it.
>>>
>>>It's better to use ATAGINFO() and construct the INDEX ON commands, then DROP TAG ALL, delete the CDX, and then rebuild each tag from scratch.
>>
>>Since I don't know what specific tags the CDX is built on, my only option was to REINDEX. Which I did.
>>Thank you.
>
>If it's damaged, you may still be able to salvage that information. The CDX has a particular internal structure and you you may be able to navigate through it and recover some of that information. If you ever have a damaged CDX and you would like to see if that information is recoverable, let me know.

Thank you, Rick. So far, since REINDEX worked, I don't suppose the CDX was/is damaged. And if absolutely necessary, I could ask Doug Hennig (who is the author of the SDT) for the tags of the CDX file.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform