Subject Re: [firebird-support] Firebird optimize table
Author Ann W. Harrison
Norman McFarlane wrote:
> In my on-going project of converting a MySQL DB to Firebird, I have come
> across a SQL statement which reads as follows:
> OPTIMIZE TABLE <tablen ame>

> It is supposed to be useful for compacting tables which have a variable row
> width, which become extremely slow weith repeated deletes and inserts.
> Is there an equivalent in Firebird, and is it even necessary?

Firebird is quite efficient in managing space in tables - reusing,
recombining, etc., so optimize table isn't necessary.

However, there is a command to set the index selectivity that you
should use periodically. Computing the selectivity of an index
is done on load, but not redone after major changes. Having a
reasonable selectivity is important to the optimizer in choosing
join orders.

Good luck,