Subject Re: REINDEX
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Thu, 11 Aug 2022 23:05:14 +0530
Newsgroups dbase.getting-started

Good Evening Ronnie,

>> (A legacy option from the dos days when index corruption was frequent)
>  
> Hmmm . . . .
>
> I would say, "could happen" rather than "was frequent".
>
> If your experience "was frequent", then I wonder if you had a problem
> elsewhere that was causing this . . . . .
>
> Bad RAM
> Disc Errors
> Bad data switch
> Bad network cable or connection
> etc.
> etc.
>
> Not forgetting "bad design" !! <g>

I was using PC without UPS and unintended shutdowns were frequent.

Then I had developed a bad habit of copying dbf files here and there.
(The most common being copying data from deployment directory to
development directory to test errors in specific cases)

(I was using windows 3.11 and vfp for dos and due to bad programming
ctrl+c was used at times)

Both these coupled caused index corruption. I think second was the main
cause. So built a index recreation program.

After shifting to laptop the first reason disappeared. But due to second
reason rebuild index program was required once or twice a quarter so
retained it.

Backups to floppy took space so in order to conserve space used to
backup just the dbf files (Reindex again became need of the hour so that
indexes could be recreated).

The next bad habit that cropped in was adding an index in development
directory and forgetting to add it in deployment directory.

It was much easier to update the reindex prg at the same time and in
deployment directory simply run it to create the latest indexes.

This gave me one more advantage. Never open deployment dbf files in ide.
No chances of accidental alteration of data.

Even today after shifting to MariaDB I try not to view deployment data
in database manager and Editing there is a BIG NO.

I take a backup of data restore it on development machine and there I do
wherever and whatever I want to do.

I do not remember being forced to use that code due corruption in index
since I shifted to dbase. But old habits die hard and it is not causing
harm so it is still there.


Regards
Akshat