Subject Re: [firebird-support] Odd problem - inconsistent result set
Author Vlad Khorsun
> From: "Milan Babuskov"
>>> 3) It is possibble for the engine to tell if there is a bad index?
>> You can use gfix to find those easily. Or do you mean at run-time when
>> you start the query that uses it?
> Yes, I mean at run-time. Is there any way to know that my query will give an
> inconsistent result because of an index corruption?

Simple answer - no. If such way exists, engine would use it to cure brocken
indexes ;)

>>> I do it with a .BAT file, and rename the restored database to the
>>> original one. Would you be so kind to show how do you do it? And how often?
>> It all depends on the amount of data you can affort to lose. For
>> example, if you can afford to lose one day's worth of changes in the
>> database, then do backup once per day.
> Sorry if was not clear, (my English doesn't help!!) I meant: how often is
> recomended to do a *backup-restore circle* in order to purge the database and
> reconstruc all its indices. I didn't know indices can broke in a database and
> I'm a bit worried about that !! By the way when should I be worried about bad
> indices? A PC crash can damage them? An electrical energy cut? a Hard disk full?

Any software have bugs. Firebird have bugs. Windows have bugs. Linux have bugs.
HDD driver have bugs. Etc, etc, etc... Even saint Oracle have bugs ;)

Firebird team fixed a lot of bugs and will fix more when reported. It is number one priority.
But nobody gives you 100% guarantee about bugs-free software.

Use latest Firebird release (1.5.5, 2.0.4, 2.1.1 etc) which have many bugs fixed.
Run gfix -v -f daily and analyze its output. If error occured, ask here how to fix it and
we will help you as much as we able. Make backups daily or more often. No need to
restore often. Many databases work years without restore.